aboutsummaryrefslogtreecommitdiffstats
path: root/testhal/STM32/STM32F7xx/GPT-ADC/main.c
diff options
context:
space:
mode:
authorGiovanni Di Sirio <gdisirio@gmail.com>2015-08-27 11:43:17 +0000
committerGiovanni Di Sirio <gdisirio@gmail.com>2015-08-27 11:43:17 +0000
commite4df1ff09dbf2f53accb9f93eacc4c9db15a4c6f (patch)
tree3f35d6e6c2198744f9573fbcee7b05645eec3c4d /testhal/STM32/STM32F7xx/GPT-ADC/main.c
parentb19f4e38da58ee3a6025775ebcb63b6878904291 (diff)
downloadChibiOS-e4df1ff09dbf2f53accb9f93eacc4c9db15a4c6f.tar.gz
ChibiOS-e4df1ff09dbf2f53accb9f93eacc4c9db15a4c6f.tar.bz2
ChibiOS-e4df1ff09dbf2f53accb9f93eacc4c9db15a4c6f.zip
Improved M7 cache handling.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@8246 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'testhal/STM32/STM32F7xx/GPT-ADC/main.c')
-rw-r--r--testhal/STM32/STM32F7xx/GPT-ADC/main.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/testhal/STM32/STM32F7xx/GPT-ADC/main.c b/testhal/STM32/STM32F7xx/GPT-ADC/main.c
index 4e1b27520..d0e810201 100644
--- a/testhal/STM32/STM32F7xx/GPT-ADC/main.c
+++ b/testhal/STM32/STM32F7xx/GPT-ADC/main.c
@@ -52,8 +52,10 @@ static adcsample_t samples1[ADC_GRP1_NUM_CHANNELS * ADC_GRP1_BUF_DEPTH];
size_t nx = 0, ny = 0;
static void adccallback(ADCDriver *adcp, adcsample_t *buffer, size_t n) {
- /* DMA buffer invalidation because data cache.*/
- dmaBufferInvalidate(buffer, buffer + (n * adcp->grpp->num_channels));
+ /* DMA buffer invalidation because data cache, only invalidating the
+ half buffer just filled.*/
+ dmaBufferInvalidate(buffer,
+ n * adcp->grpp->num_channels * sizeof (adcsample_t));
/* Updating counters.*/
if (samples1 == buffer) {