cancel
Showing results for 
Search instead for 
Did you mean: 

STM32H7xx SPI. Tutorial, documentation or example code needed.

JBend.6
Associate III

I need to write firmware for STM32H7xx to interact with an SPI flash memory chip. (STM32 master, 8-bit, full-duplex polling, no CRC and application controlled #CS.) I am using STM32CubeIDE 1.14.0 and used the device configuration tool to produce my SPI1 configuration code using LL library calls.

I encountered problems with code based upon HAL library hanging whilst reading to verify a write. So I wish to use either the Low-Level or register based programming. I have written firmware for SPI peripherals before but this STM32H7xx is a whole new level.

Yes, I have read, re-read and read again the RM0468 Reference Manual. The poor English quality and lack of clear procedures do not help. It's like trying to learn a foreign language using a dictionary. I am struggling to find any good material for this family of chips. I have spent days on this and getting nowhere.

Thanks.

12 REPLIES 12

@JBend.6 Again, my hopes here are with AI. It can interpret the documentation personally for every user, search a lot of documents, erratas, forums, source code. It's not right there yet but getting close.

Cool, to complain about a "complicated datasheet and reference manual", to judge the English used in it, when the OP has also such a "bad" English. Very nice attitude. Please come back, so that we can ignore you.  LOL.

Maybe you are right to draw attention to my judgement of the English used in the documentation when my own English is not perfect. However, the English in your post is flawed too.

Surely it is reasonable for a programmer or software engineer to have defective English providing that their code is of good standard. On the other hand, technical authors employed to write documentation would not be expected to write good code but would be expected to have a good command of English.

I do regret the original post which was written at the end the third day of long days trying to figure out how to get the SPI working on this device. My criticism of the ST documentation is that there is a tendency to use acronyms and nomenclature within the text without offering any explanation or definition. In the case of RM0468 the SPI peripheral is presented as OCTOSPI, being an 8-bus SPI interface. As an example, the document includes a section on DQS usage but does not clearly explain what DQS is or when it would be used.

“The DQS signal can be used for data strobing during the read transactions when the device toggles the DQS aligned with the data.”

Thanks to Pavel A. for the suggestion of using AI. ChatGPT was able to throw some light on the matter.