From f2c1436c044721987a9c83849d2be94f2c087404 Mon Sep 17 00:00:00 2001 From: SPRESENSE <41312067+SPRESENSE@users.noreply.github.com> Date: Tue, 7 Jul 2020 14:02:19 +0900 Subject: [PATCH 01/22] Minor fix condition of posFixMode --- .../SPRESENSE/hardware/spresense/1.0.0/libraries/GNSS/GNSS.h | 2 +- .../1.0.0/libraries/GNSS/examples/gnss_tracker/gnss_tracker.ino | 2 +- .../libraries/LTE/examples/LteGnssTracker/LteGnssTracker.ino | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Arduino15/packages/SPRESENSE/hardware/spresense/1.0.0/libraries/GNSS/GNSS.h b/Arduino15/packages/SPRESENSE/hardware/spresense/1.0.0/libraries/GNSS/GNSS.h index 0ef5bda7a..ff03f3389 100644 --- a/Arduino15/packages/SPRESENSE/hardware/spresense/1.0.0/libraries/GNSS/GNSS.h +++ b/Arduino15/packages/SPRESENSE/hardware/spresense/1.0.0/libraries/GNSS/GNSS.h @@ -149,7 +149,7 @@ class SpNavData { SpGnssTime time; /**< Time when this position data was updated */ unsigned char type; /**< Position type; 0:Invalid, 1:GNSS, 2:reserv, 3:user set, 4:previous */ unsigned char numSatellites; /**< Number of visible satellites */ - unsigned char posFixMode; /**< FIX mode, 0:Invalid, 1:2D FIX, 2:3D FIX */ + unsigned char posFixMode; /**< FIX mode, 1:Invalid, 2:2D FIX, 3:3D FIX */ unsigned char posDataExist; /**< Is position data existed, 0:none, 1:exist */ unsigned char numSatellitesCalcPos; /**< Number of satellites to calculate the position */ unsigned short satelliteType; /**< using sv system, bit field; bit0:GPS, bit1:GLONASS */ diff --git a/Arduino15/packages/SPRESENSE/hardware/spresense/1.0.0/libraries/GNSS/examples/gnss_tracker/gnss_tracker.ino b/Arduino15/packages/SPRESENSE/hardware/spresense/1.0.0/libraries/GNSS/examples/gnss_tracker/gnss_tracker.ino index 2067f0405..e90c1555b 100644 --- a/Arduino15/packages/SPRESENSE/hardware/spresense/1.0.0/libraries/GNSS/examples/gnss_tracker/gnss_tracker.ino +++ b/Arduino15/packages/SPRESENSE/hardware/spresense/1.0.0/libraries/GNSS/examples/gnss_tracker/gnss_tracker.ino @@ -982,7 +982,7 @@ void loop() { /* Get NavData. */ Gnss.getNavData(&NavData); - LedSet = ((NavData.posDataExist) && (NavData.posFixMode != 0)); + LedSet = ((NavData.posDataExist) && (NavData.posFixMode != FixInvalid)); if(PosFixflag != LedSet) { Led_isPosfix(LedSet); diff --git a/Arduino15/packages/SPRESENSE/hardware/spresense/1.0.0/libraries/LTE/examples/LteGnssTracker/LteGnssTracker.ino b/Arduino15/packages/SPRESENSE/hardware/spresense/1.0.0/libraries/LTE/examples/LteGnssTracker/LteGnssTracker.ino index 292d41a17..b9e4dffd0 100644 --- a/Arduino15/packages/SPRESENSE/hardware/spresense/1.0.0/libraries/LTE/examples/LteGnssTracker/LteGnssTracker.ino +++ b/Arduino15/packages/SPRESENSE/hardware/spresense/1.0.0/libraries/LTE/examples/LteGnssTracker/LteGnssTracker.ino @@ -158,7 +158,7 @@ void loop() SpNavData navData; Gnss.getNavData(&navData); - bool posFix = ((navData.posDataExist) && (navData.posFixMode != 0)); + bool posFix = ((navData.posDataExist) && (navData.posFixMode != FixInvalid)); if (posFix) { Serial.println("Position is fixed."); String nmeaString = getNmeaGga(&navData); From 6395f64e06c434bc9c29254ecabb92aca6481589 Mon Sep 17 00:00:00 2001 From: SPRESENSE <41312067+SPRESENSE@users.noreply.github.com> Date: Tue, 7 Jul 2020 17:19:20 +0900 Subject: [PATCH 02/22] Add out of memory checking in a SharedMemory example --- .../1.0.0/libraries/MP/examples/SharedMemory/Main/Main.ino | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Arduino15/packages/SPRESENSE/hardware/spresense/1.0.0/libraries/MP/examples/SharedMemory/Main/Main.ino b/Arduino15/packages/SPRESENSE/hardware/spresense/1.0.0/libraries/MP/examples/SharedMemory/Main/Main.ino index cf0612f0e..29e7bfde1 100644 --- a/Arduino15/packages/SPRESENSE/hardware/spresense/1.0.0/libraries/MP/examples/SharedMemory/Main/Main.ino +++ b/Arduino15/packages/SPRESENSE/hardware/spresense/1.0.0/libraries/MP/examples/SharedMemory/Main/Main.ino @@ -37,6 +37,11 @@ void setup() /* Allocate Shared Memory */ uint8_t *addr = (uint8_t *)MP.AllocSharedMemory(MEMSIZE); + if (!addr) { + printf("Error: out of memory\n"); + return; + } + printf("SharedMemory Address=@%08x\n", (uint32_t)addr); /* memory fill */ From 1b2a4601ce8b525fe3ef96ac56c7747c71799800 Mon Sep 17 00:00:00 2001 From: SPRESENSE <41312067+SPRESENSE@users.noreply.github.com> Date: Tue, 7 Jul 2020 23:03:26 +0900 Subject: [PATCH 03/22] Update error message in an exmple of number_recognition If the dnnrt.begin() fails, there are two possibilities. One is that the bootloader isn't installed, and another is that there isn't enough memory to load dnnrt. --- .../DNNRT/examples/number_recognition/number_recognition.ino | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Arduino15/packages/SPRESENSE/hardware/spresense/1.0.0/libraries/DNNRT/examples/number_recognition/number_recognition.ino b/Arduino15/packages/SPRESENSE/hardware/spresense/1.0.0/libraries/DNNRT/examples/number_recognition/number_recognition.ino index da20b5477..e5b7e9ae6 100644 --- a/Arduino15/packages/SPRESENSE/hardware/spresense/1.0.0/libraries/DNNRT/examples/number_recognition/number_recognition.ino +++ b/Arduino15/packages/SPRESENSE/hardware/spresense/1.0.0/libraries/DNNRT/examples/number_recognition/number_recognition.ino @@ -49,9 +49,10 @@ void setup() { } int ret = dnnrt.begin(nnbfile); if (ret < 0) { - Serial.print("Runtime initialization failure. "); + Serial.println("Runtime initialization failure."); if (ret == -16) { - Serial.println("Please update bootloader!"); + Serial.print("Please install bootloader!"); + Serial.println(" or consider memory configuration!"); } else { Serial.println(ret); } From 0dae3eda0fd2aec3e7524b0b3f80363faa1357bd Mon Sep 17 00:00:00 2001 From: SPRESENSE <41312067+SPRESENSE@users.noreply.github.com> Date: Tue, 7 Jul 2020 14:22:58 +0900 Subject: [PATCH 04/22] Add empty functions of Wire new timeout API Add methods with compatibility --- .../spresense/1.0.0/libraries/Wire/Wire.cpp | 18 ++++++++++++++++++ .../spresense/1.0.0/libraries/Wire/Wire.h | 3 +++ 2 files changed, 21 insertions(+) diff --git a/Arduino15/packages/SPRESENSE/hardware/spresense/1.0.0/libraries/Wire/Wire.cpp b/Arduino15/packages/SPRESENSE/hardware/spresense/1.0.0/libraries/Wire/Wire.cpp index b311d5aa7..8f39d5011 100644 --- a/Arduino15/packages/SPRESENSE/hardware/spresense/1.0.0/libraries/Wire/Wire.cpp +++ b/Arduino15/packages/SPRESENSE/hardware/spresense/1.0.0/libraries/Wire/Wire.cpp @@ -270,6 +270,24 @@ void TwoWire::setClock(uint32_t clock) } } +void TwoWire::setWireTimeout(uint32_t timeout, bool reset_with_timeout) +{ + // dummy function + return; +} + +bool TwoWire::getWireTimeoutFlag(void) +{ + // dummy function always returns false + return false; +} + +void TwoWire::clearWireTimeoutFlag(void) +{ + // dummy function + return; +} + // sets function called on slave write void TwoWire::onReceive(TWIReceiveHandler handler) { diff --git a/Arduino15/packages/SPRESENSE/hardware/spresense/1.0.0/libraries/Wire/Wire.h b/Arduino15/packages/SPRESENSE/hardware/spresense/1.0.0/libraries/Wire/Wire.h index 025500a5e..6773ffe0a 100644 --- a/Arduino15/packages/SPRESENSE/hardware/spresense/1.0.0/libraries/Wire/Wire.h +++ b/Arduino15/packages/SPRESENSE/hardware/spresense/1.0.0/libraries/Wire/Wire.h @@ -88,6 +88,9 @@ class TwoWire : public Stream uint8_t endTransmission(void) { return endTransmission(true); } void setClock(uint32_t clock); + void setWireTimeout(uint32_t timeout = 25000, bool reset_with_timeout = false); + bool getWireTimeoutFlag(void); + void clearWireTimeoutFlag(void); void onReceive(TWIReceiveHandler handler); void onRequest(TWIRequestHandler handler); From 87089ee315ac632b06a4a8b02a6d89604eaaeb47 Mon Sep 17 00:00:00 2001 From: SPRESENSE <41312067+SPRESENSE@users.noreply.github.com> Date: Thu, 16 Jul 2020 04:38:58 +0900 Subject: [PATCH 05/22] Fix sample sketch bug --- .../rendering_objif/rendering_objif.ino | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/Arduino15/packages/SPRESENSE/hardware/spresense/1.0.0/libraries/Audio/examples/application/rendering_objif/rendering_objif.ino b/Arduino15/packages/SPRESENSE/hardware/spresense/1.0.0/libraries/Audio/examples/application/rendering_objif/rendering_objif.ino index d445dc438..ea73c93e3 100644 --- a/Arduino15/packages/SPRESENSE/hardware/spresense/1.0.0/libraries/Audio/examples/application/rendering_objif/rendering_objif.ino +++ b/Arduino15/packages/SPRESENSE/hardware/spresense/1.0.0/libraries/Audio/examples/application/rendering_objif/rendering_objif.ino @@ -23,6 +23,8 @@ #include #include +#include + #define READSAMPLE (240) #define BYTEWIDTH (2) #define CHNUM (2) @@ -129,7 +131,7 @@ static enum State { Stopping, } s_state = Ready; -static bool getFrame(AsPcmDataParam *pcm) +static bool getFrame(AsPcmDataParam *pcm, bool direct_read) { /* Alloc MemHandle */ if (pcm->mh.allocSeg(S0_REND_PCM_BUF_POOL, READSIZE) != ERR_OK) { @@ -140,7 +142,7 @@ static bool getFrame(AsPcmDataParam *pcm) pcm->identifier = 0; pcm->callback = 0; pcm->bit_length = 16; - pcm->size = myBuffer.readbuf((uint8_t *)pcm->mh.getPa()); + pcm->size = (direct_read) ? myFile.read((uint8_t *)pcm->mh.getPa(), READSIZE) : myBuffer.readbuf((uint8_t *)pcm->mh.getPa()); pcm->sample = pcm->size / BYTEWIDTH / CHNUM; pcm->is_end = (pcm->size < READSIZE); pcm->is_valid = (pcm->size > 0); @@ -148,6 +150,10 @@ static bool getFrame(AsPcmDataParam *pcm) return true; } +static bool getFrame(AsPcmDataParam *pcm) +{ + return getFrame(pcm, false); +} static bool start(uint8_t no) { @@ -179,7 +185,7 @@ static bool start(uint8_t no) /* Start rendering. */ for (int i = 0; i < RREREQUEST; i++) { AsPcmDataParam pcm_param; - if (!getFrame(&pcm_param)) { + if (!getFrame(&pcm_param, true)) { break; } @@ -214,7 +220,7 @@ static bool restart() for (int i = 0; i < RREREQUEST; i++) { AsPcmDataParam pcm_param; - if (getFrame(&pcm_param)) { + if (getFrame(&pcm_param, true)) { /* Send PCM */ int err = theMixer->sendData(OutputMixer0, outmixer_send_callback, @@ -370,6 +376,9 @@ void setup() /* Set main volume */ theMixer->setVolume(0, 0, 0); + /* Unmute */ + board_external_amp_mute_control(false); + printf("setup() complete\n"); } From 7d5fda0545723cc1a99298a883137ccc874848a9 Mon Sep 17 00:00:00 2001 From: SPRESENSE <41312067+SPRESENSE@users.noreply.github.com> Date: Tue, 28 Jul 2020 13:16:45 +0900 Subject: [PATCH 06/22] Fix spelling mistake --- .../1.0.0/libraries/SignalProcessing/keywords.txt | 4 ++-- .../1.0.0/libraries/SignalProcessing/src/FFT.h | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Arduino15/packages/SPRESENSE/hardware/spresense/1.0.0/libraries/SignalProcessing/keywords.txt b/Arduino15/packages/SPRESENSE/hardware/spresense/1.0.0/libraries/SignalProcessing/keywords.txt index be91a3c76..d63dd7d9b 100644 --- a/Arduino15/packages/SPRESENSE/hardware/spresense/1.0.0/libraries/SignalProcessing/keywords.txt +++ b/Arduino15/packages/SPRESENSE/hardware/spresense/1.0.0/libraries/SignalProcessing/keywords.txt @@ -11,8 +11,8 @@ BEF KEYWORD1 FFTLEN LITERAL1 MAX_CHNUM LITERAL1 INPUT_BUFFER LITERAL1 -WindoHamming LITERAL1 -WindoHanning LITERAL1 +WindowHamming LITERAL1 +WindowHanning LITERAL1 WindowRectangle LITERAL1 TYPE_LPF LITERAL1 diff --git a/Arduino15/packages/SPRESENSE/hardware/spresense/1.0.0/libraries/SignalProcessing/src/FFT.h b/Arduino15/packages/SPRESENSE/hardware/spresense/1.0.0/libraries/SignalProcessing/src/FFT.h index 71141473a..8e853eb76 100644 --- a/Arduino15/packages/SPRESENSE/hardware/spresense/1.0.0/libraries/SignalProcessing/src/FFT.h +++ b/Arduino15/packages/SPRESENSE/hardware/spresense/1.0.0/libraries/SignalProcessing/src/FFT.h @@ -32,8 +32,8 @@ /*------------------------------------------------------------------*/ /* WINDOW TYPE */ typedef enum e_windowType { - WindoHamming, - WindoHanning, + WindowHamming, + WindowHanning, WindowRectangle } windowType_t; @@ -44,7 +44,7 @@ template class FFTClass { public: void begin(){ - begin(WindoHamming, MAX_CHNUM, (FFTLEN/2)); + begin(WindowHamming, MAX_CHNUM, (FFTLEN/2)); } bool begin(windowType_t type, int channel, int overlap){ @@ -119,9 +119,9 @@ template class FFTClass void create_coef(windowType_t type){ for (int i = 0; i < FFTLEN / 2; i++){ - if(type == WindoHamming){ + if(type == WindowHamming){ coef[i] = 0.54f - (0.46f * arm_cos_f32(2 * PI * (float)i / (FFTLEN - 1))); - }else if(type == WindoHanning){ + }else if(type == WindowHanning){ coef[i] = 0.54f - (1.0f * arm_cos_f32(2 * PI * (float)i / (FFTLEN - 1))); }else{ coef[i] = 1; From 58cc32eef47fa1762479bc2c4650885031d31862 Mon Sep 17 00:00:00 2001 From: SPRESENSE <41312067+SPRESENSE@users.noreply.github.com> Date: Thu, 30 Jul 2020 15:17:30 +0900 Subject: [PATCH 07/22] watchdog: Add fd checker to several functions --- .../1.0.0/libraries/Watchdog/Watchdog.cpp | 80 +++++++++++++------ 1 file changed, 56 insertions(+), 24 deletions(-) diff --git a/Arduino15/packages/SPRESENSE/hardware/spresense/1.0.0/libraries/Watchdog/Watchdog.cpp b/Arduino15/packages/SPRESENSE/hardware/spresense/1.0.0/libraries/Watchdog/Watchdog.cpp index 118412858..63be05393 100755 --- a/Arduino15/packages/SPRESENSE/hardware/spresense/1.0.0/libraries/Watchdog/Watchdog.cpp +++ b/Arduino15/packages/SPRESENSE/hardware/spresense/1.0.0/libraries/Watchdog/Watchdog.cpp @@ -66,28 +66,42 @@ void WatchdogClass::begin(void) void WatchdogClass::start(uint32_t timeout) { int ret; - ret = ioctl(wd_fd, WDIOC_SETTIMEOUT, (unsigned long)timeout); - if (ret < 0) + if (0 <= wd_fd) { - watchdog_printf("watchdog: ioctl(WDIOC_SETTIMEOUT) failed\n"); - return; + ret = ioctl(wd_fd, WDIOC_SETTIMEOUT, (unsigned long)timeout); + if (ret < 0) + { + watchdog_printf("watchdog: ioctl(WDIOC_SETTIMEOUT) failed\n"); + return; + } + + ret = ioctl(wd_fd, WDIOC_START, 0); + if (ret < 0) + { + watchdog_printf("watchdog: ioctl(WDIOC_START) failed\n"); + } } - - ret = ioctl(wd_fd, WDIOC_START, 0); - if (ret < 0) + else { - watchdog_printf("wdog_main: ioctl(WDIOC_START) failed\n"); + watchdog_printf("watchdog: watchdog not initialized.\n"); } } // Public : Send kick to avoid bite void WatchdogClass::kick(void) { int ret; - - ret = ioctl(wd_fd, WDIOC_KEEPALIVE, 0); - if (ret < 0) + + if (0 <= wd_fd) { - watchdog_printf("wdog_main: ioctl(WDIOC_KEEPALIVE) failed\n"); + ret = ioctl(wd_fd, WDIOC_KEEPALIVE, 0); + if (ret < 0) + { + watchdog_printf("watchdog: ioctl(WDIOC_KEEPALIVE) failed\n"); + } + } + else + { + watchdog_printf("watchdog: watchdog not initialized.\n"); } } @@ -96,31 +110,49 @@ uint32_t WatchdogClass::timeleft(void) { struct watchdog_status_s status; int ret; - ret = ioctl(wd_fd, WDIOC_GETSTATUS, (unsigned long)&status); - if (ret < 0) + if (0 <= wd_fd) { - watchdog_printf("wdog_main: ioctl(WDIOC_GETSTATUS) failed\n"); - } + ret = ioctl(wd_fd, WDIOC_GETSTATUS, (unsigned long)&status); + if (ret < 0) + { + watchdog_printf("watchdog: ioctl(WDIOC_GETSTATUS) failed\n"); + } - return status.timeleft; + return status.timeleft; + } + else + { + watchdog_printf("watchdog: watchdog not initialized.\n"); + return -1; + } } // Public : Stop the Watchdog void WatchdogClass::stop(void) { int ret; - - ret = ioctl(wd_fd, WDIOC_STOP, 0); - if (ret < 0) + + if (0 <= wd_fd) { - watchdog_printf("wdog_main: ioctl(WDIOC_STOP) failed\n"); + ret = ioctl(wd_fd, WDIOC_STOP, 0); + if (ret < 0) + { + watchdog_printf("watchdog: ioctl(WDIOC_STOP) failed\n"); + } + } + else + { + watchdog_printf("watchdog: watchdog not initialized.\n"); } } // Public : Finalize to use the Watchdog void WatchdogClass::end(void) { - stop(); - close(wd_fd); - wd_fd = -1; + if (0 <= wd_fd) + { + stop(); + close(wd_fd); + wd_fd = -1; + } } From b593f11246d4836bb0cf8237adb96284bbae4fe4 Mon Sep 17 00:00:00 2001 From: SPRESENSE <41312067+SPRESENSE@users.noreply.github.com> Date: Fri, 7 Aug 2020 09:26:45 +0900 Subject: [PATCH 08/22] Fix tap size bug --- .../spresense/1.0.0/libraries/SignalProcessing/src/FFT.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Arduino15/packages/SPRESENSE/hardware/spresense/1.0.0/libraries/SignalProcessing/src/FFT.h b/Arduino15/packages/SPRESENSE/hardware/spresense/1.0.0/libraries/SignalProcessing/src/FFT.h index 8e853eb76..22f063594 100644 --- a/Arduino15/packages/SPRESENSE/hardware/spresense/1.0.0/libraries/SignalProcessing/src/FFT.h +++ b/Arduino15/packages/SPRESENSE/hardware/spresense/1.0.0/libraries/SignalProcessing/src/FFT.h @@ -150,7 +150,7 @@ template class FFTClass case 1024: arm_rfft_1024_fast_init_f32(&S); break; - case 2096: + case 2048: arm_rfft_2048_fast_init_f32(&S); break; case 4096: From a4e772bfd0b9bb036d01096a1d3a4ffc852e4ca9 Mon Sep 17 00:00:00 2001 From: SPRESENSE <41312067+SPRESENSE@users.noreply.github.com> Date: Wed, 15 Jul 2020 17:18:00 +0900 Subject: [PATCH 09/22] Add error message in Wire new timeout API --- .../hardware/spresense/1.0.0/libraries/Wire/Wire.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Arduino15/packages/SPRESENSE/hardware/spresense/1.0.0/libraries/Wire/Wire.cpp b/Arduino15/packages/SPRESENSE/hardware/spresense/1.0.0/libraries/Wire/Wire.cpp index 8f39d5011..4b67c89b4 100644 --- a/Arduino15/packages/SPRESENSE/hardware/spresense/1.0.0/libraries/Wire/Wire.cpp +++ b/Arduino15/packages/SPRESENSE/hardware/spresense/1.0.0/libraries/Wire/Wire.cpp @@ -273,18 +273,23 @@ void TwoWire::setClock(uint32_t clock) void TwoWire::setWireTimeout(uint32_t timeout, bool reset_with_timeout) { // dummy function + unuse(timeout); + unuse(reset_with_timeout); + printf("ERROR: setWireTimeout is not supported\n"); return; } bool TwoWire::getWireTimeoutFlag(void) { // dummy function always returns false + printf("ERROR: getWireTimeoutFlag is not supported\n"); return false; } void TwoWire::clearWireTimeoutFlag(void) { // dummy function + printf("ERROR: clearWireTimeoutFlag is not supported\n"); return; } From 9d0baba254df98c05bcc3155a158e88b17dbea1b Mon Sep 17 00:00:00 2001 From: SPRESENSE <41312067+SPRESENSE@users.noreply.github.com> Date: Tue, 18 Aug 2020 21:18:13 +0900 Subject: [PATCH 10/22] Update version to SDK2.0.2 --- Arduino15/package_spresense_index.json | 28 +++++++++++++------------- tools/version | 2 +- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/Arduino15/package_spresense_index.json b/Arduino15/package_spresense_index.json index c2e29865f..016ffb159 100755 --- a/Arduino15/package_spresense_index.json +++ b/Arduino15/package_spresense_index.json @@ -11,13 +11,13 @@ { "category": "SPRESENSE", "name": "Spresense Reference Board", - "url": "https://github.com/sonydevworld/spresense-arduino-compatible/releases/download/v2.0.1/spresense-v2.0.1.tar.gz", + "url": "https://github.com/sonydevworld/spresense-arduino-compatible/releases/download/v2.0.2/spresense-v2.0.2.tar.gz", "help": { "online": "https://github.com/sonydevworld/spresense-arduino-compatible/releases" }, "version": "1.0.0", "architecture": "spresense", - "archiveFileName": "spresense-v2.0.1.tar.gz", + "archiveFileName": "spresense-v2.0.2.tar.gz", "boards": [ { "name": "Generic Spresense Module" @@ -49,22 +49,22 @@ "name": "spresense-sdk", "systems": [ { - "url": "https://github.com/sonydevworld/spresense-arduino-compatible/releases/download/v2.0.1/spresense-sdk-v2.0.1.tar.gz", + "url": "https://github.com/sonydevworld/spresense-arduino-compatible/releases/download/v2.0.2/spresense-sdk-v2.0.2.tar.gz", "host": "i686-mingw32", - "archiveFileName": "spresense-sdk-v2.0.1.tar.gz", + "archiveFileName": "spresense-sdk-v2.0.2.tar.gz", "size": "6257789" }, { "_comment": "Allow x64-Linux build", - "url": "https://github.com/sonydevworld/spresense-arduino-compatible/releases/download/v2.0.1/spresense-sdk-v2.0.1.tar.gz", + "url": "https://github.com/sonydevworld/spresense-arduino-compatible/releases/download/v2.0.2/spresense-sdk-v2.0.2.tar.gz", "host": "x86_64-pc-linux-gnu", - "archiveFileName": "spresense-sdk-v2.0.1.tar.gz", + "archiveFileName": "spresense-sdk-v2.0.2.tar.gz", "size": "6257789" }, { - "url": "https://github.com/sonydevworld/spresense-arduino-compatible/releases/download/v2.0.1/spresense-sdk-v2.0.1.tar.gz", + "url": "https://github.com/sonydevworld/spresense-arduino-compatible/releases/download/v2.0.2/spresense-sdk-v2.0.2.tar.gz", "host": "i386-apple-darwin11", - "archiveFileName": "spresense-sdk-v2.0.1.tar.gz", + "archiveFileName": "spresense-sdk-v2.0.2.tar.gz", "size": "6257789" } ] @@ -74,21 +74,21 @@ "name": "spresense-tools", "systems": [ { - "url": "https://github.com/sonydevworld/spresense-arduino-compatible/releases/download/v2.0.1/spresense-tools-v2.0.1.tar.gz", + "url": "https://github.com/sonydevworld/spresense-arduino-compatible/releases/download/v2.0.2/spresense-tools-v2.0.2.tar.gz", "host": "i686-mingw32", - "archiveFileName": "spresense-tools-v2.0.1.tar.gz", + "archiveFileName": "spresense-tools-v2.0.2.tar.gz", "size": "59294138" }, { "_comment": "Allow x64-Linux build", - "url": "https://github.com/sonydevworld/spresense-arduino-compatible/releases/download/v2.0.1/spresense-tools-v2.0.1.tar.gz", + "url": "https://github.com/sonydevworld/spresense-arduino-compatible/releases/download/v2.0.2/spresense-tools-v2.0.2.tar.gz", "host": "x86_64-pc-linux-gnu", - "archiveFileName": "spresense-tools-v2.0.1.tar.gz", + "archiveFileName": "spresense-tools-v2.0.2.tar.gz", "size": "59294138" }, { - "url": "https://github.com/sonydevworld/spresense-arduino-compatible/releases/download/v2.0.1/spresense-tools-v2.0.1.tar.gz", + "url": "https://github.com/sonydevworld/spresense-arduino-compatible/releases/download/v2.0.2/spresense-tools-v2.0.2.tar.gz", "host": "i386-apple-darwin11", - "archiveFileName": "spresense-tools-v2.0.1.tar.gz", + "archiveFileName": "spresense-tools-v2.0.2.tar.gz", "size": "59294138" } ] diff --git a/tools/version b/tools/version index 38f77a65b..e9307ca57 100644 --- a/tools/version +++ b/tools/version @@ -1 +1 @@ -2.0.1 +2.0.2 From b7d6dfec9188ff0ca58ddf054f2abe0230dc8867 Mon Sep 17 00:00:00 2001 From: SPRESENSE <41312067+SPRESENSE@users.noreply.github.com> Date: Wed, 19 Aug 2020 10:36:34 +0900 Subject: [PATCH 11/22] Update library version to 1.4.5 for Audio --- .../hardware/spresense/1.0.0/libraries/Audio/library.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Arduino15/packages/SPRESENSE/hardware/spresense/1.0.0/libraries/Audio/library.properties b/Arduino15/packages/SPRESENSE/hardware/spresense/1.0.0/libraries/Audio/library.properties index fbfd039e4..7fb7e5a05 100644 --- a/Arduino15/packages/SPRESENSE/hardware/spresense/1.0.0/libraries/Audio/library.properties +++ b/Arduino15/packages/SPRESENSE/hardware/spresense/1.0.0/libraries/Audio/library.properties @@ -1,5 +1,5 @@ name=Audio -version=1.4.4 +version=1.4.5 author=Sony Semiconductor Solutions maintainer=Sony Semiconductor Solutions sentence=Spresense Audio Subsystem Library From d16b16a0314d2e186690740bc1bc69e48fd620a4 Mon Sep 17 00:00:00 2001 From: SPRESENSE <41312067+SPRESENSE@users.noreply.github.com> Date: Wed, 19 Aug 2020 10:54:48 +0900 Subject: [PATCH 12/22] Update library version to 1.1.1 for DNNRT --- .../hardware/spresense/1.0.0/libraries/DNNRT/library.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Arduino15/packages/SPRESENSE/hardware/spresense/1.0.0/libraries/DNNRT/library.properties b/Arduino15/packages/SPRESENSE/hardware/spresense/1.0.0/libraries/DNNRT/library.properties index e65cd9f22..c70015131 100644 --- a/Arduino15/packages/SPRESENSE/hardware/spresense/1.0.0/libraries/DNNRT/library.properties +++ b/Arduino15/packages/SPRESENSE/hardware/spresense/1.0.0/libraries/DNNRT/library.properties @@ -1,5 +1,5 @@ name=DNNRT -version=1.1.0 +version=1.1.1 author=Sony Semiconductor Solutions maintainer=Sony Semiconductor Solutions sentence=Deep Neural Network Runtime From f0d941d0a8cf8abaf7aeddec0ca76fb21b5b0be6 Mon Sep 17 00:00:00 2001 From: SPRESENSE <41312067+SPRESENSE@users.noreply.github.com> Date: Wed, 19 Aug 2020 10:55:16 +0900 Subject: [PATCH 13/22] Update library version to 1.0.3 for LTE --- .../hardware/spresense/1.0.0/libraries/LTE/library.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Arduino15/packages/SPRESENSE/hardware/spresense/1.0.0/libraries/LTE/library.properties b/Arduino15/packages/SPRESENSE/hardware/spresense/1.0.0/libraries/LTE/library.properties index 027e46ee0..a20efbd81 100755 --- a/Arduino15/packages/SPRESENSE/hardware/spresense/1.0.0/libraries/LTE/library.properties +++ b/Arduino15/packages/SPRESENSE/hardware/spresense/1.0.0/libraries/LTE/library.properties @@ -1,5 +1,5 @@ name=LTE -version=1.0.2 +version=1.0.3 author=Sony Semiconductor Solutions maintainer=Sony Semiconductor Solutions sentence=Spresense LTE From 3c1d3b2c2bd60ba7f1cc00bee6996be71c588c1c Mon Sep 17 00:00:00 2001 From: SPRESENSE <41312067+SPRESENSE@users.noreply.github.com> Date: Wed, 19 Aug 2020 10:55:36 +0900 Subject: [PATCH 14/22] Update library version to 1.0.4 for MP --- .../hardware/spresense/1.0.0/libraries/MP/library.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Arduino15/packages/SPRESENSE/hardware/spresense/1.0.0/libraries/MP/library.properties b/Arduino15/packages/SPRESENSE/hardware/spresense/1.0.0/libraries/MP/library.properties index 61774dfaf..85514eb31 100644 --- a/Arduino15/packages/SPRESENSE/hardware/spresense/1.0.0/libraries/MP/library.properties +++ b/Arduino15/packages/SPRESENSE/hardware/spresense/1.0.0/libraries/MP/library.properties @@ -1,5 +1,5 @@ name=MultiCore MP -version=1.0.3 +version=1.0.4 author=Sony Semiconductor Solutions maintainer=Sony Semiconductor Solutions sentence=Spresense MultiCore MP Library From 06a8411778d8014907e36d20641fb9ccb467467a Mon Sep 17 00:00:00 2001 From: SPRESENSE <41312067+SPRESENSE@users.noreply.github.com> Date: Wed, 19 Aug 2020 10:56:03 +0900 Subject: [PATCH 15/22] Update library version to 1.0.1 for Watchdog --- .../spresense/1.0.0/libraries/Watchdog/library.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Arduino15/packages/SPRESENSE/hardware/spresense/1.0.0/libraries/Watchdog/library.properties b/Arduino15/packages/SPRESENSE/hardware/spresense/1.0.0/libraries/Watchdog/library.properties index 200891762..5e5dadb82 100644 --- a/Arduino15/packages/SPRESENSE/hardware/spresense/1.0.0/libraries/Watchdog/library.properties +++ b/Arduino15/packages/SPRESENSE/hardware/spresense/1.0.0/libraries/Watchdog/library.properties @@ -1,5 +1,5 @@ name=Watchdog -version=1.0 +version=1.0.1 author=Sony Semiconductor Solutions maintainer=Sony Semiconductor Solutions sentence=Spresense Watchdog Library From 77d86134e6a3aad0e0776aa69ae281594d2c8876 Mon Sep 17 00:00:00 2001 From: SPRESENSE <41312067+SPRESENSE@users.noreply.github.com> Date: Wed, 19 Aug 2020 10:56:28 +0900 Subject: [PATCH 16/22] Update library version to 1.3.1 for GNSS --- .../hardware/spresense/1.0.0/libraries/GNSS/library.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Arduino15/packages/SPRESENSE/hardware/spresense/1.0.0/libraries/GNSS/library.properties b/Arduino15/packages/SPRESENSE/hardware/spresense/1.0.0/libraries/GNSS/library.properties index 79dad7c5a..4b0908366 100644 --- a/Arduino15/packages/SPRESENSE/hardware/spresense/1.0.0/libraries/GNSS/library.properties +++ b/Arduino15/packages/SPRESENSE/hardware/spresense/1.0.0/libraries/GNSS/library.properties @@ -1,5 +1,5 @@ name=GNSS -version=1.3.0 +version=1.3.1 author=Sony Semiconductor Solutions maintainer=Sony Semiconductor Solutions sentence=Spresense GNSS(Global Navigation Satellite System) Library From 995fb182a9e3655d548316632aec465d4aa6f344 Mon Sep 17 00:00:00 2001 From: SPRESENSE <41312067+SPRESENSE@users.noreply.github.com> Date: Wed, 19 Aug 2020 10:56:49 +0900 Subject: [PATCH 17/22] Update library version to 1.1.0 for Wire --- .../hardware/spresense/1.0.0/libraries/Wire/library.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Arduino15/packages/SPRESENSE/hardware/spresense/1.0.0/libraries/Wire/library.properties b/Arduino15/packages/SPRESENSE/hardware/spresense/1.0.0/libraries/Wire/library.properties index af00ce21d..4e0cb3c7b 100644 --- a/Arduino15/packages/SPRESENSE/hardware/spresense/1.0.0/libraries/Wire/library.properties +++ b/Arduino15/packages/SPRESENSE/hardware/spresense/1.0.0/libraries/Wire/library.properties @@ -1,5 +1,5 @@ name=Wire -version=1.0 +version=1.1.0 author=Sony Semiconductor Solutions maintainer=Sony Semiconductor Solutions sentence=This library allows you to communicate with I2C and Two Wire Interface devices. From 84c4a9c536bcd70222c529ede95281c3c6bb4570 Mon Sep 17 00:00:00 2001 From: SPRESENSE <41312067+SPRESENSE@users.noreply.github.com> Date: Wed, 19 Aug 2020 10:57:13 +0900 Subject: [PATCH 18/22] Update library version to 1.1.0 for SignalProcessing --- .../1.0.0/libraries/SignalProcessing/library.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Arduino15/packages/SPRESENSE/hardware/spresense/1.0.0/libraries/SignalProcessing/library.properties b/Arduino15/packages/SPRESENSE/hardware/spresense/1.0.0/libraries/SignalProcessing/library.properties index c7f7cb2c8..6c394e80b 100644 --- a/Arduino15/packages/SPRESENSE/hardware/spresense/1.0.0/libraries/SignalProcessing/library.properties +++ b/Arduino15/packages/SPRESENSE/hardware/spresense/1.0.0/libraries/SignalProcessing/library.properties @@ -1,5 +1,5 @@ name=Signal Processing -version=1.0.0 +version=1.1.0 author=Sony Semiconductor Solutions maintainer=Sony Semiconductor Solutions sentence=Spresense Signal Processing Libraries From f691c99b2cc70a7556a85c4c4ee7ef5fad38623a Mon Sep 17 00:00:00 2001 From: SPRESENSE <41312067+SPRESENSE@users.noreply.github.com> Date: Wed, 19 Aug 2020 13:40:09 +0900 Subject: [PATCH 19/22] Modify to add a initialize function for SDClass --- .../1.0.0/libraries/Camera/examples/camera/camera.ino | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Arduino15/packages/SPRESENSE/hardware/spresense/1.0.0/libraries/Camera/examples/camera/camera.ino b/Arduino15/packages/SPRESENSE/hardware/spresense/1.0.0/libraries/Camera/examples/camera/camera.ino index a6856eb58..d52b60cb5 100644 --- a/Arduino15/packages/SPRESENSE/hardware/spresense/1.0.0/libraries/Camera/examples/camera/camera.ino +++ b/Arduino15/packages/SPRESENSE/hardware/spresense/1.0.0/libraries/Camera/examples/camera/camera.ino @@ -122,6 +122,12 @@ void setup() ; /* wait for serial port to connect. Needed for native USB port only */ } + /* Initialize SD */ + while (!theSD.begin()) + { + /* wait until SD card is mounted. */ + Serial.println("Insert SD card."); + } /* begin() without parameters means that * number of buffers = 1, 30FPS, QVGA, YUV 4:2:2 format */ From 6164abcce81f47c3648b4f01a9ea5b934173f431 Mon Sep 17 00:00:00 2001 From: SPRESENSE <41312067+SPRESENSE@users.noreply.github.com> Date: Wed, 19 Aug 2020 16:00:00 +0900 Subject: [PATCH 20/22] Wait to insert the SD card before start camera --- .../1.0.0/libraries/Camera/examples/hfr_jpg/hfr_jpg.ino | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Arduino15/packages/SPRESENSE/hardware/spresense/1.0.0/libraries/Camera/examples/hfr_jpg/hfr_jpg.ino b/Arduino15/packages/SPRESENSE/hardware/spresense/1.0.0/libraries/Camera/examples/hfr_jpg/hfr_jpg.ino index 952fe1183..f2962588c 100644 --- a/Arduino15/packages/SPRESENSE/hardware/spresense/1.0.0/libraries/Camera/examples/hfr_jpg/hfr_jpg.ino +++ b/Arduino15/packages/SPRESENSE/hardware/spresense/1.0.0/libraries/Camera/examples/hfr_jpg/hfr_jpg.ino @@ -135,7 +135,12 @@ void setup() ; /* wait for serial port to connect. Needed for native USB port only */ } - theSD.begin(); + /* Initialize SD */ + while (!theSD.begin()) + { + /* wait until SD card is mounted. */ + Serial.println("Insert SD card."); + } /* Shooting JPEG sequence without frame's gap requires multiple buffers. */ From ebc2c9dfaa1528fccb63ade2f6a7fd616310ca54 Mon Sep 17 00:00:00 2001 From: SPRESENSE <41312067+SPRESENSE@users.noreply.github.com> Date: Wed, 19 Aug 2020 16:15:01 +0900 Subject: [PATCH 21/22] Add theSD.begin() for waiting to insert the SD Card for Audio --- .../application/dual_players/dual_players.ino | 6 +++++- .../dual_players_objif/dual_players_objif.ino | 6 +++++- .../Audio/examples/application/player/player.ino | 7 +++++++ .../application/player_hires/player_hires.ino | 7 +++++++ .../application/player_objIf/player_objIf.ino | 7 +++++++ .../application/player_playlist/player_playlist.ino | 9 ++++++--- .../examples/application/player_wav/player_wav.ino | 9 +++++++-- .../Audio/examples/application/rec_play/rec_play.ino | 7 +++++++ .../Audio/examples/application/recorder/recorder.ino | 9 +++++++-- .../application/recorder_objif/recorder_objif.ino | 9 +++++++-- .../application/recorder_wav/recorder_wav.ino | 9 +++++++-- .../recorder_wav_objif/recorder_wav_objif.ino | 11 ++++++++--- .../recorder_with_rendering.ino | 7 ++++++- .../application/rendering_objif/rendering_objif.ino | 8 ++++++-- 14 files changed, 92 insertions(+), 19 deletions(-) diff --git a/Arduino15/packages/SPRESENSE/hardware/spresense/1.0.0/libraries/Audio/examples/application/dual_players/dual_players.ino b/Arduino15/packages/SPRESENSE/hardware/spresense/1.0.0/libraries/Audio/examples/application/dual_players/dual_players.ino index 3288f745b..f014910df 100644 --- a/Arduino15/packages/SPRESENSE/hardware/spresense/1.0.0/libraries/Audio/examples/application/dual_players/dual_players.ino +++ b/Arduino15/packages/SPRESENSE/hardware/spresense/1.0.0/libraries/Audio/examples/application/dual_players/dual_players.ino @@ -175,7 +175,11 @@ void setup() /* Mount SD card */ - theSD.begin(); + while (!theSD.begin()) + { + /* wait until SD card is mounted. */ + Serial.println("Insert SD card."); + } /* Set output device to speaker */ diff --git a/Arduino15/packages/SPRESENSE/hardware/spresense/1.0.0/libraries/Audio/examples/application/dual_players_objif/dual_players_objif.ino b/Arduino15/packages/SPRESENSE/hardware/spresense/1.0.0/libraries/Audio/examples/application/dual_players_objif/dual_players_objif.ino index 5e7c9768e..830a33253 100644 --- a/Arduino15/packages/SPRESENSE/hardware/spresense/1.0.0/libraries/Audio/examples/application/dual_players_objif/dual_players_objif.ino +++ b/Arduino15/packages/SPRESENSE/hardware/spresense/1.0.0/libraries/Audio/examples/application/dual_players_objif/dual_players_objif.ino @@ -387,7 +387,11 @@ void setup() /* Mount SD card */ - theSD.begin(); + while (!theSD.begin()) + { + /* wait until SD card is mounted. */ + Serial.println("Insert SD card."); + } /* Initialize memory pools and message libs */ diff --git a/Arduino15/packages/SPRESENSE/hardware/spresense/1.0.0/libraries/Audio/examples/application/player/player.ino b/Arduino15/packages/SPRESENSE/hardware/spresense/1.0.0/libraries/Audio/examples/application/player/player.ino index a656d621d..944904378 100755 --- a/Arduino15/packages/SPRESENSE/hardware/spresense/1.0.0/libraries/Audio/examples/application/player/player.ino +++ b/Arduino15/packages/SPRESENSE/hardware/spresense/1.0.0/libraries/Audio/examples/application/player/player.ino @@ -55,6 +55,13 @@ static void audio_attention_cb(const ErrorAttentionParam *atprm) */ void setup() { + /* Initialize SD */ + while (!theSD.begin()) + { + /* wait until SD card is mounted. */ + Serial.println("Insert SD card."); + } + // start audio system theAudio = AudioClass::getInstance(); diff --git a/Arduino15/packages/SPRESENSE/hardware/spresense/1.0.0/libraries/Audio/examples/application/player_hires/player_hires.ino b/Arduino15/packages/SPRESENSE/hardware/spresense/1.0.0/libraries/Audio/examples/application/player_hires/player_hires.ino index 754c32825..72c271ecb 100644 --- a/Arduino15/packages/SPRESENSE/hardware/spresense/1.0.0/libraries/Audio/examples/application/player_hires/player_hires.ino +++ b/Arduino15/packages/SPRESENSE/hardware/spresense/1.0.0/libraries/Audio/examples/application/player_hires/player_hires.ino @@ -90,6 +90,13 @@ void setup() exit(1); } + /* Initialize SD */ + while (!theSD.begin()) + { + /* wait until SD card is mounted. */ + Serial.println("Insert SD card."); + } + /* Open file placed on SD card */ myFile = theSD.open("HiResSound.wav"); diff --git a/Arduino15/packages/SPRESENSE/hardware/spresense/1.0.0/libraries/Audio/examples/application/player_objIf/player_objIf.ino b/Arduino15/packages/SPRESENSE/hardware/spresense/1.0.0/libraries/Audio/examples/application/player_objIf/player_objIf.ino index f90633070..cee1d3d60 100644 --- a/Arduino15/packages/SPRESENSE/hardware/spresense/1.0.0/libraries/Audio/examples/application/player_objIf/player_objIf.ino +++ b/Arduino15/packages/SPRESENSE/hardware/spresense/1.0.0/libraries/Audio/examples/application/player_objIf/player_objIf.ino @@ -179,6 +179,13 @@ void setup() */ thePlayer->init(MediaPlayer::Player0, AS_CODECTYPE_MP3, "/mnt/sd0/BIN", AS_SAMPLINGRATE_48000, AS_CHANNEL_STEREO); + /* Initialize SD */ + while (!theSD.begin()) + { + /* wait until SD card is mounted. */ + Serial.println("Insert SD card."); + } + myFile = theSD.open("Sound.mp3"); /* Verify file open */ diff --git a/Arduino15/packages/SPRESENSE/hardware/spresense/1.0.0/libraries/Audio/examples/application/player_playlist/player_playlist.ino b/Arduino15/packages/SPRESENSE/hardware/spresense/1.0.0/libraries/Audio/examples/application/player_playlist/player_playlist.ino index a3c5f6f95..9065df43b 100644 --- a/Arduino15/packages/SPRESENSE/hardware/spresense/1.0.0/libraries/Audio/examples/application/player_playlist/player_playlist.ino +++ b/Arduino15/packages/SPRESENSE/hardware/spresense/1.0.0/libraries/Audio/examples/application/player_playlist/player_playlist.ino @@ -250,9 +250,12 @@ void setup() printf("Repeat=%s\n", (preset.repeat) ? "On" : "Off"); printf("Auto=%s\n", (preset.autoplay) ? "On" : "Off"); - /* Use SD card */ - - theSD.begin(); + /* Initialize SD */ + while (!theSD.begin()) + { + /* wait until SD card is mounted. */ + Serial.println("Insert SD card."); + } /* Initialize playlist */ diff --git a/Arduino15/packages/SPRESENSE/hardware/spresense/1.0.0/libraries/Audio/examples/application/player_wav/player_wav.ino b/Arduino15/packages/SPRESENSE/hardware/spresense/1.0.0/libraries/Audio/examples/application/player_wav/player_wav.ino index f20461cc7..20e67f156 100644 --- a/Arduino15/packages/SPRESENSE/hardware/spresense/1.0.0/libraries/Audio/examples/application/player_wav/player_wav.ino +++ b/Arduino15/packages/SPRESENSE/hardware/spresense/1.0.0/libraries/Audio/examples/application/player_wav/player_wav.ino @@ -66,7 +66,12 @@ static const uint32_t sc_prestore_frames = 10; void setup() { - theSD.begin(); + /* Initialize SD */ + while (!theSD.begin()) + { + /* wait until SD card is mounted. */ + Serial.println("Insert SD card."); + } // Get wav file info @@ -218,4 +223,4 @@ stop_player: theAudio->stopPlayer(AudioClass::Player0); myFile.close(); exit(1); -} +} diff --git a/Arduino15/packages/SPRESENSE/hardware/spresense/1.0.0/libraries/Audio/examples/application/rec_play/rec_play.ino b/Arduino15/packages/SPRESENSE/hardware/spresense/1.0.0/libraries/Audio/examples/application/rec_play/rec_play.ino index f461bbd74..29e49ab82 100644 --- a/Arduino15/packages/SPRESENSE/hardware/spresense/1.0.0/libraries/Audio/examples/application/rec_play/rec_play.ino +++ b/Arduino15/packages/SPRESENSE/hardware/spresense/1.0.0/libraries/Audio/examples/application/rec_play/rec_play.ino @@ -61,6 +61,13 @@ static void audio_attention_cb(const ErrorAttentionParam *atprm) */ void setup() { + /* Initialize SD */ + while (!theSD.begin()) + { + /* wait until SD card is mounted. */ + Serial.println("Insert SD card."); + } + // start audio system theAudio = AudioClass::getInstance(); diff --git a/Arduino15/packages/SPRESENSE/hardware/spresense/1.0.0/libraries/Audio/examples/application/recorder/recorder.ino b/Arduino15/packages/SPRESENSE/hardware/spresense/1.0.0/libraries/Audio/examples/application/recorder/recorder.ino index 7a17dc344..8851ca8f4 100644 --- a/Arduino15/packages/SPRESENSE/hardware/spresense/1.0.0/libraries/Audio/examples/application/recorder/recorder.ino +++ b/Arduino15/packages/SPRESENSE/hardware/spresense/1.0.0/libraries/Audio/examples/application/recorder/recorder.ino @@ -74,6 +74,13 @@ static const int32_t recoding_size = recoding_byte_per_second * recoding_time; void setup() { + /* Initialize SD */ + while (!theSD.begin()) + { + /* wait until SD card is mounted. */ + Serial.println("Insert SD card."); + } + theAudio = AudioClass::getInstance(); theAudio->begin(audio_attention_cb); @@ -92,8 +99,6 @@ void setup() /* Open file for data write on SD card */ - theSD.begin(); - if (theSD.exists(RECORD_FILE_NAME)) { printf("Remove existing file [%s].\n", RECORD_FILE_NAME); diff --git a/Arduino15/packages/SPRESENSE/hardware/spresense/1.0.0/libraries/Audio/examples/application/recorder_objif/recorder_objif.ino b/Arduino15/packages/SPRESENSE/hardware/spresense/1.0.0/libraries/Audio/examples/application/recorder_objif/recorder_objif.ino index 9190cc709..0f06eda2d 100644 --- a/Arduino15/packages/SPRESENSE/hardware/spresense/1.0.0/libraries/Audio/examples/application/recorder_objif/recorder_objif.ino +++ b/Arduino15/packages/SPRESENSE/hardware/spresense/1.0.0/libraries/Audio/examples/application/recorder_objif/recorder_objif.ino @@ -124,6 +124,13 @@ static bool mediarecorder_done_callback(AsRecorderEvent event, uint32_t result, void setup() { + /* Initialize SD */ + while (!theSD.begin()) + { + /* wait until SD card is mounted. */ + Serial.println("Insert SD card."); + } + /* Initialize memory pools and message libs */ initMemoryPools(); @@ -161,8 +168,6 @@ void setup() /* Open file for data write on SD card */ - theSD.begin(); - if (theSD.exists(RECORD_FILE_NAME)) { printf("Remove existing file [%s].\n", RECORD_FILE_NAME); diff --git a/Arduino15/packages/SPRESENSE/hardware/spresense/1.0.0/libraries/Audio/examples/application/recorder_wav/recorder_wav.ino b/Arduino15/packages/SPRESENSE/hardware/spresense/1.0.0/libraries/Audio/examples/application/recorder_wav/recorder_wav.ino index 2e14ff66d..0e3feb0c9 100644 --- a/Arduino15/packages/SPRESENSE/hardware/spresense/1.0.0/libraries/Audio/examples/application/recorder_wav/recorder_wav.ino +++ b/Arduino15/packages/SPRESENSE/hardware/spresense/1.0.0/libraries/Audio/examples/application/recorder_wav/recorder_wav.ino @@ -89,6 +89,13 @@ static const int32_t recoding_size = recoding_byte_per_second * recoding_time; void setup() { + /* Initialize SD */ + while (!theSD.begin()) + { + /* wait until SD card is mounted. */ + Serial.println("Insert SD card."); + } + theAudio = AudioClass::getInstance(); theAudio->begin(audio_attention_cb); @@ -108,8 +115,6 @@ void setup() /* Open file for data write on SD card */ - theSD.begin(); - if (theSD.exists(RECORD_FILE_NAME)) { printf("Remove existing file [%s].\n", RECORD_FILE_NAME); diff --git a/Arduino15/packages/SPRESENSE/hardware/spresense/1.0.0/libraries/Audio/examples/application/recorder_wav_objif/recorder_wav_objif.ino b/Arduino15/packages/SPRESENSE/hardware/spresense/1.0.0/libraries/Audio/examples/application/recorder_wav_objif/recorder_wav_objif.ino index 4f8b17057..011866b5f 100644 --- a/Arduino15/packages/SPRESENSE/hardware/spresense/1.0.0/libraries/Audio/examples/application/recorder_wav_objif/recorder_wav_objif.ino +++ b/Arduino15/packages/SPRESENSE/hardware/spresense/1.0.0/libraries/Audio/examples/application/recorder_wav_objif/recorder_wav_objif.ino @@ -143,6 +143,13 @@ void setup() usleep(100 * 1000); /* waiting for Mic startup */ + /* Initialize SD */ + while (!theSD.begin()) + { + /* wait until SD card is mounted. */ + Serial.println("Insert SD card."); + } + /* * Initialize recorder to decode stereo wav stream with 48kHz sample rate * Search for SRC filter in "/mnt/sd0/BIN" directory @@ -156,8 +163,6 @@ void setup() "/mnt/sd0/BIN"); /* Open file for data write on SD card */ - - theSD.begin(); if (theSD.exists(RECORD_FILE_NAME)) { @@ -218,7 +223,7 @@ err_t execute_aframe(uint32_t* size) { signal_process(*size); }else{ - return err; + return err; } int ret = s_myFile.write((uint8_t*)&s_buffer, *size); if (ret < 0) diff --git a/Arduino15/packages/SPRESENSE/hardware/spresense/1.0.0/libraries/Audio/examples/application/recorder_with_rendering/recorder_with_rendering.ino b/Arduino15/packages/SPRESENSE/hardware/spresense/1.0.0/libraries/Audio/examples/application/recorder_with_rendering/recorder_with_rendering.ino index 64df27b6f..c882ed615 100644 --- a/Arduino15/packages/SPRESENSE/hardware/spresense/1.0.0/libraries/Audio/examples/application/recorder_with_rendering/recorder_with_rendering.ino +++ b/Arduino15/packages/SPRESENSE/hardware/spresense/1.0.0/libraries/Audio/examples/application/recorder_with_rendering/recorder_with_rendering.ino @@ -147,7 +147,12 @@ void mediaplayer_decode_callback(AsPcmDataParam pcm_param) void setup() { - theSD.begin(); + /* Initialize SD */ + while (!theSD.begin()) + { + /* wait until SD card is mounted. */ + Serial.println("Insert SD card."); + } /* Initialize memory pools and message libs */ diff --git a/Arduino15/packages/SPRESENSE/hardware/spresense/1.0.0/libraries/Audio/examples/application/rendering_objif/rendering_objif.ino b/Arduino15/packages/SPRESENSE/hardware/spresense/1.0.0/libraries/Audio/examples/application/rendering_objif/rendering_objif.ino index ea73c93e3..00a97d619 100644 --- a/Arduino15/packages/SPRESENSE/hardware/spresense/1.0.0/libraries/Audio/examples/application/rendering_objif/rendering_objif.ino +++ b/Arduino15/packages/SPRESENSE/hardware/spresense/1.0.0/libraries/Audio/examples/application/rendering_objif/rendering_objif.ino @@ -351,8 +351,12 @@ void setup() initMemoryPools(); createStaticPools(MEM_LAYOUT_PLAYER); - /* Use SD card */ - theSD.begin(); + /* Initialize SD */ + while (!theSD.begin()) + { + /* wait until SD card is mounted. */ + Serial.println("Insert SD card."); + } /* Start audio system */ theMixer = OutputMixer::getInstance(); From a1b29096750a5d772ffde567c6532d69a2d162e5 Mon Sep 17 00:00:00 2001 From: SPRESENSE <41312067+SPRESENSE@users.noreply.github.com> Date: Mon, 24 Aug 2020 18:01:47 +0900 Subject: [PATCH 22/22] Update library version to 1.2.1 for Camera --- .../spresense/1.0.0/libraries/Camera/library.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Arduino15/packages/SPRESENSE/hardware/spresense/1.0.0/libraries/Camera/library.properties b/Arduino15/packages/SPRESENSE/hardware/spresense/1.0.0/libraries/Camera/library.properties index f4da0cd89..8b53e7372 100644 --- a/Arduino15/packages/SPRESENSE/hardware/spresense/1.0.0/libraries/Camera/library.properties +++ b/Arduino15/packages/SPRESENSE/hardware/spresense/1.0.0/libraries/Camera/library.properties @@ -1,5 +1,5 @@ name=Camera -version=1.2.0 +version=1.2.1 author=Sony Semiconductor Solutions maintainer=Sony Semiconductor Solutions sentence=Spresense Camera Library