drivers: dma: stm32: only control IRQ settings in dma_config#102014
drivers: dma: stm32: only control IRQ settings in dma_config#102014benedekkupper wants to merge 1 commit intozephyrproject-rtos:mainfrom
Conversation
The current implementation doesn't allow (re)starting a DMA transfer either via dma_start or dma_reload after dma_stop has been called, as dma_stop disables the completion IRQ, and dma_start and dma_reload don't enable them. Since the DMA stream doesn't trigger interrupts when disabled, disabling the stream itself in dma_stop is sufficient, so dma_config shall be responsible for enabling and for disabling the IRQs, depending on the configuration. Signed-off-by: Benedek Kupper <kupper.benedek@gmail.com>
|
|
Hello, I ran the tests There were some issues encountered during tests on platforms with DMA v1 compatibility (nucleo_f429zi, nucleo_f746zg, nucleo_f207zg, nucleo_h753zi (+ dmamux)) and DMA U5 compatibility (nucleo_wba55cg).
Logs: nucleo_h753zi: Platforms affected: nucleo_f429zi, nucleo_f746zg, nucleo_f207zg, nucleo_h753zi
Platform affected: nucleo_wba55cg |
|
How can I run these tests myself? I have STM32F4 and H7 devices to test on. If this approach doesn't work out, an alternative would be enabling interrupts in |
On Linux with twister:
and check the console output in twister-out /boards_name/scenario_name/ With west :
From my point of view, dma_reload() should never modify interrupt configuration, it should only refresh buffer parameters and restart the stream. There may be race conditions if reload happens while IRQ handling is in progress. |
|
This pull request has been marked as stale because it has been open (more than) 60 days with no activity. Remove the stale label or add a comment saying that you would like to have the label removed otherwise this pull request will automatically be closed in 14 days. Note, that you can always re-open a closed pull request at any time. |



The current implementation doesn't allow (re)starting a DMA transfer either via
dma_startordma_reloadafterdma_stophas been called, asdma_stopdisables the completion IRQ, anddma_startanddma_reloaddon't enable them.Since the DMA stream doesn't trigger interrupts when disabled, disabling the stream itself in
dma_stopis sufficient, sodma_configshall be responsible for enabling and for disabling the IRQs, depending on the configuration.With this change in place, many drivers using dma could perform the
dma_configin theirinitmethod (as most of the configuration is fixed or defined in DT), and only rely ondma_reload/dma_startanddma_stopAPI at the rest of the runtime.