diff options
| author | Scott Shawcroft <scott@chickadee.tech> | 2017-08-03 13:43:26 -0700 |
|---|---|---|
| committer | Scott Shawcroft <scott@chickadee.tech> | 2017-08-03 13:44:31 -0700 |
| commit | 8f3c5ebdc82c7562c5c6554744289407c59e8599 (patch) | |
| tree | bceb66b797a55efda886c441ddb437db633fd65f /atmel-samd | |
| parent | c08cc4106be59980b20cb17eead533ed77ba6f7b (diff) | |
atmel-samd: Clear the error bit after the known buffer overflow and be explicit about dst increase.
Diffstat (limited to 'atmel-samd')
| -rw-r--r-- | atmel-samd/shared_dma.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/atmel-samd/shared_dma.c b/atmel-samd/shared_dma.c index bffd37880..7b1fd003f 100644 --- a/atmel-samd/shared_dma.c +++ b/atmel-samd/shared_dma.c @@ -131,6 +131,7 @@ enum status_code shared_dma_write(Sercom* sercom, const uint8_t* buffer, uint32_ sercom->SPI.DATA.reg; } sercom->SPI.STATUS.bit.BUFOVF = 1; + sercom->SPI.INTFLAG.reg = SERCOM_SPI_INTFLAG_ERROR; return general_dma_tx.job_status; } @@ -148,6 +149,7 @@ enum status_code shared_dma_read(Sercom* sercom, uint8_t* buffer, uint32_t lengt dma_descriptor_get_config_defaults(&descriptor_config); descriptor_config.beat_size = DMA_BEAT_SIZE_BYTE; descriptor_config.src_increment_enable = false; + descriptor_config.dst_increment_enable = true; descriptor_config.block_transfer_count = length; // DATA register is consistently addressed across all SERCOM modes. descriptor_config.source_address = ((uint32_t)&sercom->SPI.DATA.reg); |
