Skip to content

Teensy41 support SDHC - Storage init Error #42227

@EmbedWise

Description

@EmbedWise

Describe the bug
Working on the Teensy41 and trying to get the SD Card functionality to work. For this using the application developed by @bdkrae / @ufechner7. See https://github.com/bdkrae/zephyr_teensy4_test. Which is based on the zephyr/samples/subsys/fs/fat_fs.

Please also mention any information which could help others to understand
the problem you're facing:

  • Using a Teensy41
  • SanDisk Edge 4GB Micro SD, both tried with a formatted (MS-DOS and ExFAT partition)

I have also tried to follow the instructions

Card voltage switch
Teensy 4.1 has no hardware to switch card voltage. As a workaround in the file zephyr/drivers/disk/usdhc.c the line 502 needs to be changed:

#define SDMMCHOST_NOT_SUPPORT USDHC_HOST_CTRL_CAP_VS18(1)

This prevents the driver from trying to switch over to 1,8V supply for the card. Also, a dummy pin is defined in board defs.

I cannot find this Macro where that is defined. I already tried using the FLAG directly USDHC_HOST_CTRL_CAP_VS18_MASK. Still the same error.

To Reproduce
Using Zephyr 2.7.1

Expected behavior
SD Card should have been mounted

Logs and console output

[00:00:00.501,000] <inf> usdhc: USDHC detection other than GPIO
[00:00:00.501,000] <err> sdhc: Storage init ERROR!

Environment:

  • OS: MacOS
  • Toolchain GNU 10.3.1
  • Zephyr 2.7.1

Metadata

Metadata

Labels

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions