File tree Expand file tree Collapse file tree 2 files changed +12
-2
lines changed
Expand file tree Collapse file tree 2 files changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -52,6 +52,11 @@ void setup()
5252 Serial.begin (115200 );
5353 while (!Serial);
5454
55+ // Enable high frequency oscillator
56+ NRF_CLOCK->EVENTS_HFCLKSTARTED = 0 ;
57+ NRF_CLOCK->TASKS_HFCLKSTART = 1 ;
58+ while (NRF_CLOCK->EVENTS_HFCLKSTARTED == 0 );
59+
5560 setupChirp ();
5661
5762 PDM.onReceive (onPDMdata);
@@ -144,7 +149,7 @@ void setupChirp(void)
144149 // A fixed frequency correction coefficient is needed to correct a clock
145150 // mismatch between the 16000Hz requested sample rate and the Nano's actual
146151 // audio sample rate.
147- err = chirp_connect_set_frequency_correction (chirp, 1.0096 );
152+ err = chirp_connect_set_frequency_correction (chirp, 1.00812 );
148153 chirpErrorHandler (err);
149154
150155 err = chirp_connect_start (chirp);
Original file line number Diff line number Diff line change 2727#include " chirp_connect.h"
2828#include " credentials.h"
2929
30- #define VOLUME 0.3 // Between 0 and 1
30+ #define VOLUME 0.1 // Between 0 and 1
3131#define BUFFER_SIZE 256
3232#define OUTPUT_SAMPLE_RATE 16667
3333
@@ -57,6 +57,11 @@ void setup()
5757 Serial.begin (115200 );
5858 while (!Serial); // Wait for Serial monitor before continuing
5959
60+ // Enable high frequency oscillator
61+ NRF_CLOCK->EVENTS_HFCLKSTARTED = 0 ;
62+ NRF_CLOCK->TASKS_HFCLKSTART = 1 ;
63+ while (NRF_CLOCK->EVENTS_HFCLKSTARTED == 0 );
64+
6065 setupChirp ();
6166 sendChirp ();
6267
You can’t perform that action at this time.
0 commit comments