forked from zephyrproject-rtos/gsoc-2022-arduino-core
-
-
Notifications
You must be signed in to change notification settings - Fork 28
Open
Description
Recent change to stm32_dma.c:
Which includes:
DMA_STM32_EXPORT_API int dma_stm32_configure(const struct device *dev,
uint32_t id,
struct dma_config *config)
{
const struct dma_stm32_config *dev_config = dev->config;
DMA_TypeDef *dma = (DMA_TypeDef *)dev_config->base;
LL_DMA_InitTypeDef DMA_InitStruct;
struct dma_stm32_stream *stream;
int ret;
LL_DMA_StructInit(&DMA_InitStruct);
/* Give channel from index 0 */
id = id - STM32_DMA_STREAM_OFFSET;
if (id >= dev_config->max_streams) {
LOG_ERR("cannot configure the dma stream %d.", id);
return -EINVAL;
}
...
Fails with the updated code as: ID = 0, STM32_DMA_STREAM_OFFSET=1
so id updated to 0xffffffff which is > max_streams and we fail.
There is a Pull request on zephyr: zephyrproject-rtos/zephyr#95803
Which renumbers 3 of the DMA indexes.
Which also then requires us to change these in all of the overlays that define DCMI.
Wondering if maybe that part of the defines should go into the boards DTS files.
Metadata
Metadata
Assignees
Labels
No labels