Hi @Vybhav_Jayaraman.
The 410 does have multiple SPI ports, each BLSP can be configured as either GPIO, SPI, or an i2c port. All SPI ports on the 410 operate as Master only, none of the SPI ports can operate as Slave. Some of the SPI ports have multiple hardware chip selects and can access multiple multiple devices, or multiple virtual devices inside a single physical device, and all of the ports could have multiple software chip selects (using GPIOs as chip selects).
For a single SPI device (ADC on your case) you rarely need two SPI busses, however you do need multiple chip selects on the SPI bus. one chip select selects data transmission mode, and the other chip select selects register read/write mode.
SPI is a 4 wire interface with transmit and receive data, clock and chip select. The Master always drives the chip select, and usually drives the clock, the polarity of the clock (active rising edge, or active falling edge) is programmable on the 410, and is often programmable on SPI devices. The transition of the chip select initiates each transaction, and the active edge of the chip select (rising or falling) is programmable. Data flows in both directions during each transaction, although SPI devices may ignore one of the data flow directions depending on the transaction.
Be careful with your definition of Master and Slave on the SPI bus, just because the ADC is generating the data doesn’t necessarily make it the Master.
I of course have not seen the data sheet for your SPI device so I cannot comment on it’s design, but it unusual for a ADC to be a SPI master. The host (in this case the 410) is usually the master to an ADC, and the ADC sample rates are programmed by the host. Since the SPI bus is bi-directional the host can read data from the ADC, and write to the ADC registers to setup the various modes.
A good simple example of a SPI connected ADC is on the Linker board, and the software provided by Linker is capable of reading the analog voltages at the ADC inputs. This is demonstrated in the BreakerBall demo that I wrote a few years ago.
Last time I looked into the SPI drivers, the hardware chip select methods were not working well, and longer transactions (transferring hundreds or thousands of bytes per transaction) were not working well, but the hardware features of the 410 do work, and I believe that there have been some updates to the drivers to address these issues. If you hunt through the forums you will find examples of working SPI.
Getting any SPI interface up and running can be challenging since the active edges of the clock and chip select need to be configured, and often the data in and out pins get swapped due to the confusing naming. You really shouldn’t try to bring up a SPI interface without a 4 channel oscilloscope, since there is no way to debug the transactions in software. But once you “see” a transaction happening with the oscilloscope you can rapidly sort out what parameter you have set incorrectly.
-Lawrence-
Summer is almost over, almost time to start looking for a job…