aboutsummaryrefslogtreecommitdiffstats
path: root/os/hal/ports/KINETIS
diff options
context:
space:
mode:
authorbunnie <bunnie@kosagi.com>2016-04-01 18:47:01 +0800
committerflabbergast <s3+flabbergast@sdfeu.org>2016-04-24 18:12:19 +0100
commit469e05d445e9fc6c7834afbea0efa14d75f4a3df (patch)
treeea081a6036a1054857580b72b5438b989bbd6415 /os/hal/ports/KINETIS
parentc35568fafc579061a8565669c106a4fcc32d8681 (diff)
downloadChibiOS-Contrib-469e05d445e9fc6c7834afbea0efa14d75f4a3df.tar.gz
ChibiOS-Contrib-469e05d445e9fc6c7834afbea0efa14d75f4a3df.tar.bz2
ChibiOS-Contrib-469e05d445e9fc6c7834afbea0efa14d75f4a3df.zip
[KINETIS] fix ADC LLD bug, grpp access after clear
Diffstat (limited to 'os/hal/ports/KINETIS')
-rw-r--r--os/hal/ports/KINETIS/LLD/hal_adc_lld.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/os/hal/ports/KINETIS/LLD/hal_adc_lld.c b/os/hal/ports/KINETIS/LLD/hal_adc_lld.c
index c0904c8..56ae4c3 100644
--- a/os/hal/ports/KINETIS/LLD/hal_adc_lld.c
+++ b/os/hal/ports/KINETIS/LLD/hal_adc_lld.c
@@ -104,12 +104,13 @@ OSAL_IRQ_HANDLER(KINETIS_ADC0_IRQ_VECTOR) {
/* At the end of the buffer then we may be finished */
if (adcp->current_index == adcp->number_of_samples) {
+ /* We are never finished in circular mode */
+ more = ADCD1.grpp->circular;
+
_adc_isr_full_code(&ADCD1);
adcp->current_index = 0;
- /* We are never finished in circular mode */
- more = ADCD1.grpp->circular;
}
if (more) {