Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion drivers/dma/dma_stm32.c
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,12 @@ static void dma_stm32_irq_handler(const struct device *dev, uint32_t id)
}
stream->dma_callback(dev, stream->user_data, callback_arg, DMA_STATUS_COMPLETE);
} else if (stm32_dma_is_unexpected_irq_happened(dma, id)) {
LOG_ERR("Unexpected irq happened.");
/* Let HAL DMA handle flags on its own */
if (!stream->hal_override) {
LOG_ERR("Unexpected irq happened.");
stm32_dma_dump_stream_irq(dma, id);
stm32_dma_clear_stream_irq(dma, id);
}
stream->dma_callback(dev, stream->user_data,
callback_arg, -EIO);
} else {
Expand Down
3 changes: 0 additions & 3 deletions drivers/dma/dma_stm32_v1.c
Original file line number Diff line number Diff line change
Expand Up @@ -306,9 +306,6 @@ bool stm32_dma_is_unexpected_irq_happened(DMA_TypeDef *dma, uint32_t id)
if (LL_DMA_IsEnabledIT_FE(dma, dma_stm32_id_to_stream(id)) &&
dma_stm32_is_fe_active(dma, id)) {
LOG_ERR("FiFo error.");
stm32_dma_dump_stream_irq(dma, id);
stm32_dma_clear_stream_irq(dma, id);

return true;
Comment on lines 308 to 309
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Referring to your previous comment, should we really keep the LOG here?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I asked myself the same question when making the commit. Issue here is that this is done in a piece of code which doesn't know the mode HAL_OVERRIDE hence if I remove it from here this would also remove it in non HAL_OVERRIDE as well.

The split between the dma_stm32 and the dma_stm32_v1 is done in a way that, from the dma_stm32 this could be more than just FE (it depends on what is checked within the dma_stm32_v1), so I don't feel it would be fully correct to also move this LOG_ERR within the dma_stm32 (even if it'd be ok based on current code).

Any opinion ?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not familiar enough with the DMA intricacies, so I don't have an opinion. I was just asking the question based on your answer to Mathieu. But if it works as is, it's ok for me.

}

Expand Down