SD card support with SDIO

It's all about the code!
Post Reply
opelpanfan
Posts: 25
Joined: Thu Oct 07, 2021 1:38 pm
Github Username: opelpanfan
Slack: Ben

SD card support with SDIO

Post by opelpanfan »

Hi.
I did enable SD card support through SDIO in firmware and set pins to correct alternative functions.
Flashed ecu and SD card becomes available with correct size as USB drive on Windows.

But I can't format it from windows.

I use 8GB sd card on a custom board.

The question is how to format SD card (FAT or FAT32), also is there any additional stuff I need to enable to get sd card logs working.

FW compiled with flag
#undef EFI_SDC_DEVICE
#define EFI_SDC_DEVICE SDCD1

SDIO sits on
PC8 - > D0 -> Alternative type 12U
PC9 -> D1 -> Alternative type 12U
PC10 - > D2 -> Alternative type 12U
PC11 -> D3 -> Alternative type 12U
PC12 -> SCK -> Alternative type 12U
PD2 -> CMD -> Alternative type 12U
User avatar
AndreyB
Site Admin
Posts: 14333
Joined: Wed Aug 28, 2013 1:28 am
Location: Jersey City
Github Username: rusefillc
Slack: Andrey B

Re: SD card support with SDIO

Post by AndreyB »

Please format while inserted directly into PC without rusEFI

Board logges if you start it from 12v.

If you start rusEFI from 5v it does not log but forwards mass storage device instead.
Very limited telepathic abilities - please post logs & tunes where appropriate - http://rusefi.com/s/questions

Always looking for C/C++/Java/PHP developers! Please help us see https://rusefi.com/s/howtocontribute
mck1117
running engine in first post
running engine in first post
Posts: 1494
Joined: Mon Jan 30, 2017 2:05 am
Location: Seattle-ish

Re: SD card support with SDIO

Post by mck1117 »

AndreyB wrote:
Mon Oct 11, 2021 6:55 pm
Please format while inserted directly into PC without rusEFI
We should absolutely be able to format a card with SD card mounted to PC.
opelpanfan wrote:
Mon Oct 11, 2021 6:42 pm
But I can't format it from windows.
Please expand on what "can't" means? Do you see an error message of some sort? We have many things, but telepathy is not yet one of them.
tobsec
Posts: 8
Joined: Thu Feb 02, 2023 10:16 am

Re: SD card support with SDIO

Post by tobsec »

Just want to jump into this relatively old discussion since I didn't found and details regarding:
1) Which kind of SD card size / type (SDHC/SDXC) is accepted by rusEFI?
and
2) Which file systems (FAT/FAT32/NTFS) are compatible with rusEFI?

Background: I tried with an 8GB (micro) SD card, which works when plugged into my Windows PC directly, but if placed in rusEFI board and connected through USB only let my Windows Explorer hang up. After maybe 10 or 15 minutes, it shows up as empty card reader. Tried with both NTFS and FAT32 formatted as well as with a Debian machine with same results.

Although, in the past I already had successfully a 1GB card working in this setup but currently didn't remember how it was formatted but I think it was FAT or FAT32. So I though maybe this card (8GB) size is too large?
mck1117
running engine in first post
running engine in first post
Posts: 1494
Joined: Mon Jan 30, 2017 2:05 am
Location: Seattle-ish

Re: SD card support with SDIO

Post by mck1117 »

1. Most SD cards should work, but some are SDIO-only, and seem to not work properly over SPI like how rusEFI interfaces with them. Most legit brand name cards seem to work. I don’t think I’ve tested over 256GB but there isn’t a limit other than file system limits.

2. FAT32 and exFAT are supported. Single partition.
Post Reply