cancel
Showing results for 
Search instead for 
Did you mean: 

how to use GPDMA in STM32U5A5Z?

achovy
Associate II

hello !

 

OV2640 is used as the camera module and I want to use GPDMA when I send DCMI data.

 

achovy_0-1714368767046.png

If MX sets up like this and generates code

achovy_1-1714368884780.png

There's an error like this (handle_GPDMA1_Channel12' undeclared (first use in this function); did you mean 'handle_GPDMA1_Channel0'?)

 

So please let me know how to use GPDMA in DCMI or OV2640, in STM32U5AZJ.

 

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
KDJEM.1
ST Employee

Hello @achovy and welcome to the Community 🙂,

-->There's an error like this (handle_GPDMA1_Channel12' undeclared (first use in this function); did you mean 'handle_GPDMA1_Channel0'?)

Thank you for bringing this issue to our attention with GPDMA: Standard Request Mode. I reported this internally.

Could you please add in main.c under Private variables this line:

 

DMA_HandleTypeDef handle_GPDMA1_Channel12;

 

KDJEM1_0-1714389785100.png

and in STM32u5xx_it.c under external variables this line:

 

extern DMA_HandleTypeDef handle_GPDMA1_Channel12;

 

KDJEM1_1-1714389803450.png

 

Also you can use the GPDMA Linked-List mode without issue. For that I recommend you to refer to  the DCMI_ContinousCap_EmbeddedSynchMode example. This example can help you to start with GPDMA and DCMI.

Also, please take a look at AN5593 How to use the GPDMA for STM32 MCUs precisely section GPDMA configuration for graphic peripherals.

KDJEM1_0-1714386901589.png

Internal ticket number: 180281 (This is an internal tracking number and is not accessible or usable by customers).

Thank you.

Thank you.

Kaouthar

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.

View solution in original post

3 REPLIES 3
KDJEM.1
ST Employee

Hello @achovy and welcome to the Community 🙂,

-->There's an error like this (handle_GPDMA1_Channel12' undeclared (first use in this function); did you mean 'handle_GPDMA1_Channel0'?)

Thank you for bringing this issue to our attention with GPDMA: Standard Request Mode. I reported this internally.

Could you please add in main.c under Private variables this line:

 

DMA_HandleTypeDef handle_GPDMA1_Channel12;

 

KDJEM1_0-1714389785100.png

and in STM32u5xx_it.c under external variables this line:

 

extern DMA_HandleTypeDef handle_GPDMA1_Channel12;

 

KDJEM1_1-1714389803450.png

 

Also you can use the GPDMA Linked-List mode without issue. For that I recommend you to refer to  the DCMI_ContinousCap_EmbeddedSynchMode example. This example can help you to start with GPDMA and DCMI.

Also, please take a look at AN5593 How to use the GPDMA for STM32 MCUs precisely section GPDMA configuration for graphic peripherals.

KDJEM1_0-1714386901589.png

Internal ticket number: 180281 (This is an internal tracking number and is not accessible or usable by customers).

Thank you.

Thank you.

Kaouthar

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.

achovy
Associate II

Thank you for your advice.

 

 

 

achovy_1-1714404495091.png

 

achovy_0-1714404446585.png

This function seems to run normally, but  I'm still having a hard time getting the image data.

I'm attaching my code here.

 

 

 

KDJEM.1
ST Employee

Hi @achovy ,

Glad to know that the initial issue is solved 🙂.

Could you please check the status of CAPTURE bit in DCMI_CR?

I recommend you to take a look at AN5020 Introduction to digital camera interface (DCMI) for STM32 MCUs may help you. This application note gives to the STM32 users some basic concepts, with easy-to-understand explanations of the features, architecture, and configuration of the DCMI. It is supported by an extensive set of detailed examples.   

If your initial issue is solved please close this thread by Accept as Solution on the reply which solved your issue. If your second issue is still, could you please create a new post to give it more visibility on the Community.  

Thank you.

Kaouthar

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.