usedbytes / picowota

A bootloader for OTA WiFi code upload to a Raspberry Pi Pico W
BSD 3-Clause "New" or "Revised" License
114 stars 21 forks source link

correctly release dma channels #8

Open felixdoerre opened 11 months ago

felixdoerre commented 11 months ago

When DMA channels are not properly deinitialzed, booted software that uses them, might choke on it.

usedbytes commented 11 months ago

Is this actually necessary? I would have expected reset_peripherals() to be taking care of wiping everything

felixdoerre commented 11 months ago

I added it locally, because the cyw43 driver from micropython uses those dma channels, and without the cleanup the driver didn't work and hang while initializing, adding this cleanup resolved the problem. And looking at the code I believe that reset_peripherals was executed while I was testing that. I can spend some time and re-evaluate that this change is still required after everything else I've tinkered, but I believe so.