The first (few?) draw requests after a large rectangle will be garbled. Until the "safer DMA transfers" have landed, it may be better to block the call if a transfer is already in flight:
@@ -369,6 +369,9 @@ impl<T: 'static + SupportedWord> DisplayController<T> {
bottom_right: (usize, usize),
color: u32,
) {
+ // Block until the previous transfer is finished
+ while self._dma2d.cr.read().start().bit_is_set() {}
+
// Output color format
self._dma2d.opfccr.write(|w| {
w.cm().bits(match &self.pixel_format {
The first (few?) draw requests after a large rectangle will be garbled. Until the "safer DMA transfers" have landed, it may be better to block the call if a transfer is already in flight: