Skip to content

Commit

Permalink
Update IRQ.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
Ralim committed Jun 1, 2024
1 parent 0f7e074 commit 46305b7
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions source/Core/BSP/Pinecilv2/IRQ.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ void read_adc_fifo(void) {
if (pending_readings != 8) {
MSG((char *)"Discarding out of sync adc %d\r\n", pending_readings);
} else {
MSG((char *)"FIFO Count %d\r\n", pending_readings);
while (pending_readings) {
pending_readings--;
uint32_t raw_reading = ADC_Read_FIFO();
Expand All @@ -60,7 +59,6 @@ void read_adc_fifo(void) {
}
}
}
ADC_FIFO_Clear();
// unblock the PID controller thread
if (xTaskGetSchedulerState() != taskSCHEDULER_NOT_STARTED) {
BaseType_t xHigherPriorityTaskWoken = pdFALSE;
Expand Down Expand Up @@ -88,6 +86,7 @@ void timer0_comp0_callback(void) {

// Timer 0 is used to co-ordinate the ADC and the output PWM
void timer0_comp1_callback(void) {
ADC_FIFO_Clear();
ADC_Start();
TIMER_ClearIntStatus(TIMER_CH0, TIMER_COMP_ID_1);
}
Expand Down

0 comments on commit 46305b7

Please sign in to comment.