You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Since #2545 landed, it's no longer possible to set the priority on DMA channel, due to the lazy init semantics. set_priority is ignored by the hardware due to the DMA peripheral being disabled/"in reset" until a driver is made with it.
There's also the additional consequence that even if set_priority worked, the setting would be cleared when all the DMA drivers are dropped, even though the channel peripheral object might still be alive, so the user won't even realise that this has happened.
Or throwaway a channel to make the initialisation happen earlier.
let lol = esp_hal::dma::Channel::new(peripherals.DMA_CH2);
core::mem::forget(lol);
Expected behavior
Setting the priority should work and stick around until the channel peripheral itself is dropped.
I think the previous Dma::new should come back (only on GDMA chips) the semantics are much clearer with that imo
Makes it more obvious when the channels are alive or not.
Environment
Target device: ESP32-C6 (though this should apply to any GDMA chip)
Crate name and version: esp-hal 0.23.1 (though I used main at the time of writing)
The text was updated successfully, but these errors were encountered:
Bug description
Since #2545 landed, it's no longer possible to set the priority on DMA channel, due to the lazy init semantics.
set_priority
is ignored by the hardware due to the DMA peripheral being disabled/"in reset" until a driver is made with it.There's also the additional consequence that even if
set_priority
worked, the setting would be cleared when all the DMA drivers are dropped, even though the channel peripheral object might still be alive, so the user won't even realise that this has happened.To Reproduce
To get anything other than zero, I either have to use the PAC like this, after the driver is made.
Or throwaway a channel to make the initialisation happen earlier.
Expected behavior
Setting the priority should work and stick around until the channel peripheral itself is dropped.
I think the previous
Dma::new
should come back (only on GDMA chips) the semantics are much clearer with that imoMakes it more obvious when the channels are alive or not.
Environment
main
at the time of writing)The text was updated successfully, but these errors were encountered: