Skip to content

Commit 9c8c219

Browse files
committed
rp2/rp2_dma: Fix default value used in pack_ctrl on RP2350.
The bit position of CHAIN_TO is not the same as on RP2040. Signed-off-by: Damien George <[email protected]>
1 parent 928466d commit 9c8c219

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ports/rp2/rp2_dma.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -315,7 +315,7 @@ static mp_obj_t rp2_dma_pack_ctrl(size_t n_pos_args, const mp_obj_t *pos_args, m
315315
// Pack keyword settings into a control register value, using either the default for this
316316
// DMA channel or the provided defaults
317317
rp2_dma_obj_t *self = MP_OBJ_TO_PTR(pos_args[0]);
318-
mp_uint_t value = DEFAULT_DMA_CONFIG | ((self->channel & 0xf) << 11);
318+
mp_uint_t value = DEFAULT_DMA_CONFIG | ((self->channel & 0xf) << DMA_CH0_CTRL_TRIG_CHAIN_TO_LSB);
319319

320320
if (n_pos_args > 1) {
321321
mp_raise_TypeError(MP_ERROR_TEXT("pack_ctrl only takes keyword arguments"));

0 commit comments

Comments
 (0)