Skip to content

Commit c66a8c0

Browse files
committed
ST7701: Raise DMA priority.
This seems to work nicely with WiFi as of the upstream Pico SDK fix: raspberrypi/pico-sdk#2209
1 parent 4d41681 commit c66a8c0

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

drivers/st7701/st7701.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -333,6 +333,7 @@ void ST7701::start_frame_xfer()
333333
// Regular RGB565 framebuffer
334334
dma_channel_config config = dma_channel_get_default_config(st_dma);
335335
channel_config_set_transfer_data_size(&config, DMA_SIZE_32);
336+
channel_config_set_high_priority(&config, true);
336337
channel_config_set_dreq(&config, pio_get_dreq(st_pio, parallel_sm, true));
337338
channel_config_set_bswap(&config, true);
338339
channel_config_set_chain_to(&config, st_dma2);
@@ -342,6 +343,7 @@ void ST7701::start_frame_xfer()
342343
channel_config_set_transfer_data_size(&config, DMA_SIZE_32);
343344
channel_config_set_read_increment(&config, false);
344345
dma_channel_configure(st_dma2, &config, &dma_hw->ch[st_dma].al3_read_addr_trig, &next_line_addr, 1, false);
346+
hw_set_bits(&bus_ctrl_hw->priority, (BUSCTRL_BUS_PRIORITY_PROC1_BITS | BUSCTRL_BUS_PRIORITY_DMA_R_BITS | BUSCTRL_BUS_PRIORITY_DMA_W_BITS));
345347
}
346348
else {
347349
st_dma3 = dma_claim_unused_channel(true);

0 commit comments

Comments
 (0)