Skip to content

Commit 8f3c5eb

Browse files
committed
atmel-samd: Clear the error bit after the known buffer overflow and be explicit about dst increase.
1 parent c08cc41 commit 8f3c5eb

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

atmel-samd/shared_dma.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,7 @@ enum status_code shared_dma_write(Sercom* sercom, const uint8_t* buffer, uint32_
131131
sercom->SPI.DATA.reg;
132132
}
133133
sercom->SPI.STATUS.bit.BUFOVF = 1;
134+
sercom->SPI.INTFLAG.reg = SERCOM_SPI_INTFLAG_ERROR;
134135

135136
return general_dma_tx.job_status;
136137
}
@@ -148,6 +149,7 @@ enum status_code shared_dma_read(Sercom* sercom, uint8_t* buffer, uint32_t lengt
148149
dma_descriptor_get_config_defaults(&descriptor_config);
149150
descriptor_config.beat_size = DMA_BEAT_SIZE_BYTE;
150151
descriptor_config.src_increment_enable = false;
152+
descriptor_config.dst_increment_enable = true;
151153
descriptor_config.block_transfer_count = length;
152154
// DATA register is consistently addressed across all SERCOM modes.
153155
descriptor_config.source_address = ((uint32_t)&sercom->SPI.DATA.reg);

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy