2023-02-23 11:33 AM
Hi all,
Right now i am working on a new revision for a project that uses the STM32H723ZG as its MCU. Furthermore I have 4 analog channels to measure some signals using 2x AD7380 ADC's. in the past revision I used SPI 1 and 4 to read and configure the ADC's. however i needed to change the settings of the ADC's to transmit the measured data on MISOA from both channels which results in 32 Clock cycles compared to 16 using MISOA and MISOB in parallel. The Problem is that the SPI interface does't have multiple MISO's and only goes up to around 40MHz SCLK before it went unstable at least in my case. Therefore I thought maybe there is a way to make this work with the OctoSPI in dual-quad mode such that both ADC's will be read at the same time and can be configured too. Or at least Connect a normal SPI for configuration and use the OctoSPI to read the measured Data. At best this will be done in a fixed timeintervall using a timer of 100kHz to 200kHz (or faster if possible) which triggers a DMA to transfer the data to the FMAC for filtering/dsp and decimation.
However this would be a bonus since i was not able to use the DMA to handle the SPI communication.
I would like to know if the OctoSPI part would be possible and if so how to go about it, since i did not find anything on this matter. All i could find is how one can use the OctoSPI to talk to Memorys but no Sensors or ADC and the like.
Best
Cem
2023-02-25 10:59 AM
I would use 2 SPI masters.
You can have both of then operating nearly simultaneoudly.
Or you turn one as slave and feed sck from the other one.
2023-02-25 11:20 AM
https://community.st.com/s/article/how-to-configure-and-use-the-pssi-on-the-stm32h7
2023-02-27 11:20 PM
Thank you for your replies,
I have thought about using two SPI's, one as master the other as slave, But in total I have two ADC's for 4 signal channels, which would result in using 4 SPI peripherals. And while SPI 1 through 3 can go up to 66.5MHz, SPI's 4 to 6 can only run slower which limits the communication speed and i can't achieve the ADC's 80MHz. In addition i will use up a lot of peripherals/pins on the MCU. So i am searching for a way to handle the communication with another peripheral.
Which brings me to the PSSI peripheral. I have looked a bit into it and it basically seems to be what i need. However what bothers me is that it was not clear to me if you can receive data on the datalines, in my case 2x 2 MISO, and generate a clock and chip select signal, such that the MCU can clock out the ADC's. If i need to use a SPI peripheral for doing this it will again limit me to its max clock speed.
2023-03-02 07:58 AM
Hello @CEnge.2,
I recommend you checking the Do you need a fast slave interface with high throughput? This is for you. article.
Regards,
Chahinez.
2023-10-21 04:29 PM
Hi CEnge.2,
I am having a project planning to use NUCLEO-STM32H743ZI2 to get ADC data from AD7380-4 (4 channels of ADC) through SPI protocol. I wonder if your QUADSPI approach has worked or not. If yes, would you mind sharing your code?
Thanks so much!