SPI configuration in Sigma DSP
Dear Team,
We are using same SPI line for both communication of 'MCU to DSP' and 'PC(USBi) to DSP'. After the SPI communication of MCU->DSP (i.e After Booting) , we need to switch for communication among PC(USBi) -> DSP. Regarding this, what are the things we need to handle in both hardware and software.Please share details
Also please share the procedure for 'SPI configuration' in Sigma DSP
Regards,
KS2021
Hello,
From your description, it sounds like you would like the USBi (SPI controller) and MCU (also SPI controller) to interface with the DSP (SPI target). In your other post you mentioned ADAU1452, so I will assume this question is also about the ADAU1452.
SPI is generally a single-controller bus, so you will need some way to avoid contention on MOSI, SCLK, and /CS. If you do nothing to account for this, the MCU and USBi may try to drive the SPI bus at the same time and the transmissions would be corrupted.
I see a few options:
Configure the MCU to tristate its SPI controller pins until the DSP is done booting. From the perspective of the USBi, it would be as though the MCU were not there. Tristated pins do have some capacitance so you will need to verify signal integrity. You can add a GPIO flag in the SigmaDSP program to signal to the MCU that booting is done.
If your MCU tristates its pins before startup (most do), you can hold the MCU in reset until the DSP is booted, then use a GPIO flag to release the MCU reset line. This is similar to the previous option but doesn't require any special programming of the MCU.
Use standalone logic to electrically switch all of the SPI pins from the USBi to the MCU. The exact choice of multiplexer is quite flexible; you should look for compatible logic levels and low propagation delay. Your MCU will have a specification on how long the delay can be between SCLK and MISO edges, make sure that is not exceeded. This option allows you to switch between the USBi and MCU as often as you like.
Best regards,
Joshua
Please log in to reply.