Skip to content

SDBlockDevice init failure on mbed-os-5.5 #5068

Closed
@costanic

Description

@costanic

Description

  • Type: Bug
  • Priority: Blocker

Bug

Target
K64F and UBLOX EVK-ODIN-W2

Toolchain:
GCC_ARM

Toolchain version:
$ arm-none-eabi-gcc --version
arm-none-eabi-gcc (GNU Tools for ARM Embedded Processors 6-2017-q2-update) 6.3.1 20170620 (release) [ARM/embedded-6-branch revision 249437]

mbed-cli version:
$ mbed --version
1.2.0

mbed-os sha:
$ git log -n1 --oneline
db4be94 (HEAD, tag: mbed_lib_rev149, tag: mbed-os-5.5.5) Merge pull request #4889 from ARMmbed/release-candidate

Also fails with:

** sd-driver sha:**
$ git log -n1 --oneline
2d24758 (HEAD, tag: sd-driver-0.1.1-mbed-os-5.5.4) Merge pull request #32 from ARMmbed/Readme_update

Also fails with:
$ git log master -n1 --oneline
9edd43d (origin/master, origin/HEAD, master) Merge pull request #60 from ARMmbed/g-fix-travis

Expected behavior
sd.init() succeeds

Actual behavior
sd.init() returns failure code -5005

Steps to reproduce
Follow instructions at https://github.com/ARMmbed/sd-driver/blob/9edd43dba50b861d0928ceda9a60bbd0e1f96d36/README.md#sdblockdevice-example-application

Compile the application for either K64F or UBLOX EVK-ODIN-W2, the issue reproduces on both platforms.

** Additional notes **

  1. This was tried with two SD cards, both failed:
  • SanDisk Edge 4GB Micro SDHC
  • SanDisk 8GB Micro SDHC
  1. This issue does not occur on older mbed-os-5.4.7 with older sd-driver
    This combination works:
    mbed-os: fc18365 (HEAD, tag: mbed_lib_rev144, tag: mbed-os-5.4.7, origin/mbed-os-5.4) Merge pull request Release candidate for mbed-os-5.4.7 #4463 from ARMmbed/release-candidate
    sd-driver: $ git log -n1 --oneline
    efc6bbc (HEAD) Add pin override for NUCLEO_F429ZI (CAN-Related Pull Request #20)

  2. Re-format the SD card and power-cycle the device when switching library versions to increase chances of success. Even with the working driver combination, the init would sometimes fail the first few times until a power cycle.

  3. Marked as a blocker since any FOTA with mbed-os-5.5.4/mbed-cloud-client-1.2.2-EA will fail when configured to use SD card for file storage.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions