2017-07-31 10:58 AM
It is DMA2D config, generated CubeMX for Keil.
hdma2d.Instance = DMA2D;
hdma2d.Init.Mode = DMA2D_M2M; hdma2d.Init.ColorMode = DMA2D_OUTPUT_ARGB8888; hdma2d.Init.OutputOffset = 0; hdma2d.LayerCfg[1].InputOffset = 0; hdma2d.LayerCfg[1].InputColorMode = DMA2D_INPUT_ARGB8888; hdma2d.LayerCfg[1].AlphaMode = DMA2D_REPLACE_ALPHA; hdma2d.LayerCfg[1].InputAlpha = 0;// hdma2d.LayerCfg[1].AlphaInverted = DMA2D_REGULAR_ALPHA;// hdma2d.LayerCfg[1].RedBlueSwap = DMA2D_RB_REGULAR;It is config for STM32F476IGTx. I must comment last lines for compillung.
It is line not for my processor
(STM32F476IGTx)
!!!This feature is only available on devices :
STM32F756xx, STM32F767xx, STM32F769xx, STM32F777xx and STM32F779xx.#dma2d #systemworkbench. #cubemx #cubemx #dma2d2017-08-01 03:48 AM
Hello
Chernobay.Vitali.002
,Thank you for reported this issue. Iraised it internally to CubeMx team for fix.
Best Regards
Imen
2017-08-01 06:19 AM
Vitaliy,
Thank you very much for identifying the error and providing a workaround.
I could not figure out why I can't use DMA2D in my project.
I also have the same
#
error when I importhttps://community.st.com/tags#/?tags=cubemx
generated project into my IDE. I am using version 4.22 of CubeMX and#
My Project is for STM32F7-DISCOVERY boardThe IDE doesn't like these 2 lines of code:
hdma2d.LayerCfg[1].AlphaInverted = DMA2D_REGULAR_ALPHA;
hdma2d.LayerCfg[1].RedBlueSwap = DMA2D_RB_REGULAR;�?�?
The compiler can't find AlphaInverted, RedBlueSwap, DMA2_REGULAR_ALPHA, DMD2D_RB_REGULAR
Commenting out those 2 lines, as Vitaliy suggested, got rid of those errors.
Great job, Vitaliy!
2017-08-01 06:44 AM
It all is descabe in file stm32f7xx_hal_dma2d.h (from line 145)
#if defined (DMA2D_FGPFCCR_AI) && defined (DMA2D_BGPFCCR_AI)
uint32_t AlphaInverted; /*!< Select regular or inverted alpha value. This parameter can be one value of @ref DMA2D_Alpha_Inverted. This feature is only available on devices : STM32F756xx, STM32F767xx, STM32F769xx, STM32F777xx and STM32F779xx.*/ #endif /* (DMA2D_FGPFCCR_AI) && (DMA2D_BGPFCCR_AI) */#if defined (DMA2D_FGPFCCR_RBS) && defined (DMA2D_BGPFCCR_RBS)
uint32_t RedBlueSwap; /*!< Select regular mode (RGB or ARGB) or swap mode (BGR or ABGR). This parameter can be one value of @ref DMA2D_RB_Swap This feature is only available on devices : STM32F756xx, STM32F767xx, STM32F769xx, STM32F777xx and STM32F779xx.*/2017-08-01 07:54 AM
Thank you!
i guess, it's time to read the source code and the manual.
2017-08-08 02:36 AM
Hello Alex,
Can you please provide the ioc file for your F746 project?
CubeMX 4.22 does not provide the possibility to configure the Alpha inversion and Red&Blue swap parameters since they are not available for this MCU:
While indeed it is available for other series (ex: F767x):
2017-08-08 10:14 AM
CubeMX (ver. 4.22) DMA2D config for STM32F746IG
________________ Attachments : 746IG_FMC_LTDC_DMA2d.ioc.zip : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006HyWb&d=%2Fa%2F0X0000000b94%2FNemg0iFxHhvs92YCUSnyh29YP1qplbku2XATdZJSKDI&asPdf=false2017-08-08 10:25 AM
2017-08-08 01:08 PM
Dear Cube-T.
Your screenshots show that the CubeMX should not have the options that Vitaliy and I have,Alpha inversion and Red and Blue swap when working on F746 chip. I downloaded mine from the ST.com Web site.