2021-10-12 02:22 AM
Hello,
I'm testing the SPI peripheral through a simple PDM mic. The problem is the SPI doesn't start at all. The CSTART bit (that is the one that start the transfer) remain cleared, even right after I SET the bit.
Now, I noticed that just after I've done the SET_BIT in the SR register happen to be set the EOT bit which indicate the (End Of Transfer). The problem is that I didn't get any data, nor in the buffer and nor in the registers.
I thought the problem could be the transfer do start, but it is stopped immediately by the rise of the EOT.
Didn't know If I am right, and more I didn't know how to solve the problem.
Thanks for all your help guys.
Solved! Go to Solution.
2021-10-12 04:42 AM
The 'H7 SPI is overcomplicated and I don't use the 'H7, but from what I see above it appears that
JW
2021-10-12 03:38 AM
How did you set up the SPI and how do you intend to operate it? Have you observed the pins? Read out and check/post content of SPI and relevant GPIO registers.
JW
2021-10-12 04:05 AM
This is my set up:
The intend to test the various operation modes: polling, IT, DMA.. Already tried all of them but got the same issue. By now I'll be happy to see it functioning just in the polling mode, for this I'm using HAL_SPI_Receive(&hspi1, buffer, 32, 100).
This is the SPI1 register before the: SET_BIT(hspi->Instance->CR1, SPI_CR1_CSTART);
This is right after:
2021-10-12 04:06 AM
Also I checked the I2S peripheral and it worked fine. Same pin configuration though.
2021-10-12 04:42 AM
The 'H7 SPI is overcomplicated and I don't use the 'H7, but from what I see above it appears that
JW
2021-10-12 06:03 AM
Thanks for the answer. I know the H7 is overcomplicated!
I don't have an oscillator yet but I tested the I2S which share the same pinout configuration. The thing that concern me most is the fact that possibly the bit clock isn't generate properly.
May I ask you if you got some oscilloscope to suggest me? I was keeping an eye on the bitscope mini though.
2021-10-12 06:57 AM
> May I ask you if you got some oscilloscope to suggest me?
Sorry, I don't make this kind of recommendations. Try some general-purpose electronics forums. If you can borrow one from a friend, even for a short time, that would provide a very good starting point, as you would learn which features are important for you are which are not.
JW
2021-10-12 07:16 AM
Thank you.
Best Regards,
Luigi