STM32H7 SPI Issues
Hello, I am running into an issue using the SPI functionality on my STM32H7 chip that is on a custom made board. What I am trying to do is read an adas3022 adc (Link to datasheet below) on a spi peripheral from the STM32H7. I have written functions for the spi protocol that are run in some tasks using freeRTOS. However, even outside of the task, just inside of the main while loop, it seems to not show the pulse of the clock. The gpio pins are shown to be correct (high and low) but the clock pin is not showing anything on the oscilloscope at all. The code also gets stuck on the second loop around waiting for the spi peripheral to get ready but it never does. There is a workaround suggested in the following forum and manual that I have read but it doesn’t seem to work. Below are screenshots of the main code and links to the manual and forum:
Figure1: part 1 of my spi_protocol() function.
Figure2: part 2 of my spi protocol function.
Figure 3: part 1 of my main while loop with the enable and workaround shown.
Figure 4: part 2 of the main while loop with disable and abort used for testing the spi and trying to get it unstuck.
Figure 5: the spi configuration that has been set up.
Figure 6: the clock configuration that has been set up.
Link 1: adas 3022 datasheet
https://www.analog.com/media/en/technical-documentation/data-sheets/ADAS3022.pdf
Link 2: Forum discussing the potential workaround that doesn't seem to work for us:
Link 3: the manual that on the limitations of the h7 that is also referenced in the forum discussion in link 2:
Not sure where the issue is but we've definitely hit a wall and not sure where to go next in the debugging process. If there is anything that I can expand on I am happy to do so and any and all suggestions help. Thank you for your help and patience!
