From f3b4abf434e8c5f0bee7a9bf5c730def54075e70 Mon Sep 17 00:00:00 2001 From: "Ben V. Brown" Date: Tue, 24 Jan 2023 18:11:44 +1100 Subject: [PATCH] Update IRQ.cpp --- source/Core/BSP/Pinecilv2/IRQ.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/source/Core/BSP/Pinecilv2/IRQ.cpp b/source/Core/BSP/Pinecilv2/IRQ.cpp index b1d058c9..0d2acd93 100644 --- a/source/Core/BSP/Pinecilv2/IRQ.cpp +++ b/source/Core/BSP/Pinecilv2/IRQ.cpp @@ -95,7 +95,10 @@ void start_PWM_output(void) { } // Timer 0 is used to co-ordinate the ADC and the output PWM -void timer0_comp0_callback(void) { ADC_Start(); } +void timer0_comp0_callback(void) { + PWM_Channel_Disable(PWM_Channel); + ADC_Start(); +} void timer0_comp1_callback(void) { PWM_Channel_Disable(PWM_Channel); } // Trigged at end of output cycle; turn off the tip PWM void switchToFastPWM(void) {