我使用 CubeIDE 1.9.0 MCU封装
STM32H7 V1.10.0
我的项目为每个硬件生成单独的文件。在这种情况下,“dcmi.c”和“dcmi.h”
DCMI 设置为 Slave 10 bits External Synchro
我使用 DCMI_PSSI DMA1 Stream 2 外设到内存
CubeIDE 在 HAL_DCMI_MspInit 中生成以下行
__HAL_LINKDMA(dcmiHandle、hdmarx、hdma_dcmi_pssi);
__HAL_LINKDMA(dcmiHandle、hdmatx、hdma_dcmi_pssi);
这两行都失败了
- ../Core/Src/dcmi.c:161:5: note: in expansion of macro '__HAL_LINKDMA'
- 161 | __HAL_LINKDMA(dcmiHandle,hdmarx,hdma_dcmi_pssi);
- | ^~~~~~~~~~~~~
- ../Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_def.h:65:43: error: 'DCMI_HandleTypeDef' {aka 'struct __DCMI_HandleTypeDef'} has no member named 'hdmatx'
- 65 | (__HANDLE__)->__PPP_DMA_FIELD__ = &(__DMA_HANDLE__);
处理这个问题的正确方法是什么?
现在,我只是将这些行注释掉。DMA 似乎有效...
dcmi.c
- /* Several peripheral DMA handle pointers point to the same DMA handle.
- Be aware that there is only one channel to perform all the requested DMAs. */
- __HAL_LINKDMA(dcmiHandle,DMA_Handle,hdma_dcmi_pssi);
- //__HAL_LINKDMA(dcmiHandle,hdmarx,hdma_dcmi_pssi);
- //__HAL_LINKDMA(dcmiHandle,hdmatx,hdma_dcmi_pssi);
这是 FW-Package 中的错误吗?
“注释掉”是正确的解决方法吗?