Skip to content

Commit 870875a

Browse files
committed
lpc175x dma bugfix writing source to destination in read
1 parent c9fa287 commit 870875a

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

targets/core/nxp/lpc175x/dma.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -354,7 +354,7 @@ namespace klib::core::lpc175x::io {
354354

355355
// setup the channel
356356
Dma::port->CH[Channel].CONFIG = (
357-
(Destination::template dma_id<0>() << 6) | (irq) << 15 |
357+
(Destination::template dma_id<0>() << 6) | (irq << 15) |
358358
(static_cast<uint32_t>(detail::dma::transfer_type::memory_to_peripheral) << 11)
359359
);
360360

@@ -408,7 +408,7 @@ namespace klib::core::lpc175x::io {
408408

409409
// setup the channel
410410
Dma::port->CH[Channel].CONFIG = (
411-
(Source::template dma_id<1>() << 6) | (irq) << 15 |
411+
(Source::template dma_id<1>() << 1) | (irq << 15) |
412412
(static_cast<uint32_t>(detail::dma::transfer_type::peripheral_to_memory) << 11)
413413
);
414414

0 commit comments

Comments
 (0)