cancel
Showing results for 
Search instead for 
Did you mean: 

STM32G4 CRC DMA

Eiffel
Associate III

Hello!

So after few frustrating hours (as usually with ST), i reached the state when i found that CRC peripheral on STM32G4 (at least) DOES NOT SUPPORT DMA. Like are you kidding me? Is it for real? First of all i could not find a DMA request for CRC. So i've been trying to find some mention in reference manual, examples, documentations aaaand nothing. Somehow the ST created MCU with CRC but ONLY with blocking access. How could anyone from management approve this? 

Theoretically the only way to use it is to have a timer which will divide AHB clock by 4 (time for CRC calculation) and use timer as trigger for DMA transfer. But if anything goes wrong in CRC, well... you are screwed.

So, congrats ST. Really clever movement. 

1 ACCEPTED SOLUTION

Accepted Solutions

Hello ST Employee. Thats really great to have a ST representative here. But lets get to the point.

1: Example for the AN4187 is 11 years old. 

2: I have found that document before but none trigger source. BUT i have noteced now, that you are mentioning MEMORY-TO-MEMORY mode! In transfer data between peripheral and memory! So this is how you cheated it out? Really? What if there will be 0WS on flash or the memory will be RAM and MCU will be not loaded? The peripheral has not any error signal. For example for case, when the input data register is updated before calculation finish. 

The fact is this is a trash. Is there any safe way, how to use DMA with CRC?

 

Edit: Without any answer i consider it as there is no safe way to use CRC with DMA. Thanks ST. 

 

View solution in original post

2 REPLIES 2
STTwo-32
ST Employee

Hello @Eiffel for the use case of CRC with DMA, I suggest you to take a look at the recommandations of the AN4187

Best Regards.

STTwo-32 

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

Hello ST Employee. Thats really great to have a ST representative here. But lets get to the point.

1: Example for the AN4187 is 11 years old. 

2: I have found that document before but none trigger source. BUT i have noteced now, that you are mentioning MEMORY-TO-MEMORY mode! In transfer data between peripheral and memory! So this is how you cheated it out? Really? What if there will be 0WS on flash or the memory will be RAM and MCU will be not loaded? The peripheral has not any error signal. For example for case, when the input data register is updated before calculation finish. 

The fact is this is a trash. Is there any safe way, how to use DMA with CRC?

 

Edit: Without any answer i consider it as there is no safe way to use CRC with DMA. Thanks ST.