From 2747e2979d47f687bedaed3a6b62a1da1e49e44c Mon Sep 17 00:00:00 2001 From: Jonathan Naylor Date: Wed, 14 Dec 2016 09:12:59 +0000 Subject: [PATCH] Enable ADC0 pre-trigger via the LPTMR to match the PDB. --- IOTeensy.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/IOTeensy.cpp b/IOTeensy.cpp index 7572ccd..4afe045 100644 --- a/IOTeensy.cpp +++ b/IOTeensy.cpp @@ -123,6 +123,7 @@ void CIO::startInt() #if defined(EXTERNAL_OSC) // Set ADC0 to trigger from the LPTMR at 24 kHz SIM_SOPT7 = SIM_SOPT7_ADC0ALTTRGEN | // Enable ADC0 alternate trigger + SIM_SOPT7_ADC0PRETRGSEL | // Enable ADC0 pre-trigger SIM_SOPT7_ADC0TRGSEL(14); // Trigger ADC0 by LPTMR0 CORE_PIN13_CONFIG = PORT_PCR_MUX(3);