Closed greymfm closed 11 months ago
In our controlller we need to temporary stop the RP2040ADCEngine, so we can use RP2040 flash memory access for saving parameters in the user interface.
The RP2040ADCEngine stop function hangs in 'dma_channel_abort': https://github.com/simplefoc/Arduino-FOC/blob/47fc35cfa6dacb1135a7786a5c8ddf160ec5fd29/src/current_sense/hardware_specific/rp2040/rp2040_mcu.cpp#L242
The reason is that DMA_IRQ_0 needs to be disabled first (before any call to 'dma_channel_abort'): irq_set_enabled(DMA_IRQ_0, false);
Then it will no longer hang in RP2040ADCEngine stop :-)
Thank you very much for reporting this! I will see that it gets fixed for the next release...
In our controlller we need to temporary stop the RP2040ADCEngine, so we can use RP2040 flash memory access for saving parameters in the user interface.
The RP2040ADCEngine stop function hangs in 'dma_channel_abort': https://github.com/simplefoc/Arduino-FOC/blob/47fc35cfa6dacb1135a7786a5c8ddf160ec5fd29/src/current_sense/hardware_specific/rp2040/rp2040_mcu.cpp#L242
The reason is that DMA_IRQ_0 needs to be disabled first (before any call to 'dma_channel_abort'): irq_set_enabled(DMA_IRQ_0, false);
Then it will no longer hang in RP2040ADCEngine stop :-)