From e96d18ac0fa564b666db80bba1e044fb88d7251a Mon Sep 17 00:00:00 2001 From: Stephan Uphoff Date: Sun, 3 Nov 2019 17:11:03 -0700 Subject: [PATCH] Set g_pdm_dma_error_reporter pointer to the error_reporter passed to InitAudioRecording() --- .../micro/examples/micro_speech/apollo3evb/audio_provider.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tensorflow/lite/micro/examples/micro_speech/apollo3evb/audio_provider.cc b/tensorflow/lite/micro/examples/micro_speech/apollo3evb/audio_provider.cc index 0f9a91a9dba..cf10785071b 100644 --- a/tensorflow/lite/micro/examples/micro_speech/apollo3evb/audio_provider.cc +++ b/tensorflow/lite/micro/examples/micro_speech/apollo3evb/audio_provider.cc @@ -247,7 +247,6 @@ void pdm_start_dma(tflite::ErrorReporter* error_reporter) { // Reset the PDM DMA flags. g_pdm_dma_error = false; - g_pdm_dma_error_reporter = error_reporter; } #if USE_MAYA @@ -460,11 +459,12 @@ TfLiteStatus InitAudioRecording(tflite::ErrorReporter* error_reporter) { #endif // USE_TIME_STAMP // Configure, turn on PDM + g_pdm_dma_error_reporter = error_reporter; pdm_init(); am_hal_interrupt_master_enable(); am_hal_pdm_fifo_flush(g_pdm_handle); // Trigger the PDM DMA for the first time manually. - pdm_start_dma(g_pdm_dma_error_reporter); + pdm_start_dma(error_reporter); error_reporter->Report("\nPDM DMA Threshold = %d", PDMn(0)->FIFOTHR);