ST意法半导体
直播中

1123127317

8年用户 1006经验值
擅长:制造/封装 接口/总线/驱动
私信 关注
[问答]

使用CubeIDE 1.9.0 MCU封装STM32H7 V1.10.0生成错误的DCMI.c怎么解决?

我使用 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 中的错误吗?
“注释掉”是正确的解决方法吗?




回帖(1)

李红梅

2022-12-1 14:21:23
这三行是生成的,而请求是针对 DCMI IP 或 PSSI IP 的。添加了一条特定的评论以告知只有一个 LINK 有用。


  • * 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(hpssi,DMA_Handle,hdma_dcmi_pssi);
  •     __HAL_LINKDMA(hpssi,hdmarx,hdma_dcmi_pssi);
  •     __HAL_LINKDMA(hpssi,hdmatx,hdma_dcmi_pssi);

应保留所需的请求,并像您一样对其他请求进行评论。每次重新生成代码时,请务必注释掉不需要的行。
举报

更多回帖

发帖
×
20
完善资料,
赚取积分