2020-01-27 11:12 PM
Hi,
I tried to add DMA2D to a successful generated and built L496 based CubeIDE\TouchGFX project .
I get compilation error regarding two elements in the DMA2D initialization function as below:
../Core/Src/main.c: In function 'MX_DMA2D_Init':
../Core/Src/main.c:286:14: error: 'DMA2D_InitTypeDef {aka struct <anonymous>}' has no member named 'BytesSwap'
hdma2d.Init.BytesSwap = DMA2D_BYTES_REGULAR;
^
../Core/Src/main.c:286:27: error: 'DMA2D_BYTES_REGULAR' undeclared (first use in this function); did you mean 'DMA2D_RB_REGULAR'?
hdma2d.Init.BytesSwap = DMA2D_BYTES_REGULAR;
^~~~~~~~~~~~~~~~~~~
DMA2D_RB_REGULAR
../Core/Src/main.c:286:27: note: each undeclared identifier is reported only once for each function it appears in
../Core/Src/main.c:287:14: error: 'DMA2D_InitTypeDef {aka struct <anonymous>}' has no member named 'LineOffsetMode'
hdma2d.Init.LineOffsetMode = DMA2D_LOM_PIXELS;
^
../Core/Src/main.c:287:32: error: 'DMA2D_LOM_PIXELS' undeclared (first use in this function); did you mean 'DMA2D_PIXEL'?
hdma2d.Init.LineOffsetMode = DMA2D_LOM_PIXELS;
^~~~~~~~~~~~~~~~
DMA2D_PIXEL
I see that if I take a a project that was created from a V3 AT those initialization are not there and also do not generated by CubeMX if I try to regenerate the code.
Note that my DMA2D bytes swap and line offset mode is the same as in the AT:
Any idea how to handle this?
2020-01-28 02:52 AM
I'll try to verify this.
2020-06-03 02:03 PM
I got same issue, did you figure it out ? I am using STM32CubeIDE v1.3.1 and all packages are updated. Trying this with STM32L496ZG.
2020-06-04 12:15 AM
I don't have this issue with CubeIDE 1.3.0, but i created the project through CubeMX 5.6.1 stand alone.
/Martin
2020-06-04 12:18 AM
Nope, not a problem when starting from CubeIDE 1.3.0 either. Can you tell me more about your process?
/Martin
2020-06-04 05:38 AM
Here is what I done:
Start new stm32 project > Search for STM32L496ZG and select the STM32L496ZGTx reference > Name my project test02 and use default location (under user folder), C++, Executable, STM32Cube > Firmware Package: STM32Cube FW_L4 v1.15.1, Copy only the necessary library files then finish.
In the MX perspective, I just activate DMA2D (Multimedia tab) without more configuration. Code is generated without any error. Building it rise errors:
2020-06-09 01:04 AM
Did you find anything ? Or am I doing something wrong...
2020-06-09 01:30 AM
I'm not sure what's going wrong for you - This seems more like a general CubeMX issue. I can't replicate it. I'm not sure if i was using STM32Cube FW_L4 v1.15.1 though.
/Martin
2020-06-09 02:18 AM
I tried with v1.15.1 and v1.15.0 and got the same issue. It seems to be a generation error from cubeMX, these wrong code lines are generated for a L4 series (my case) but are only compatible with L4+ series