-
Notifications
You must be signed in to change notification settings - Fork 63
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Example code of using SD card in SDIO mode #16
Comments
If you want to use 4-bit mode then all sd_d[3:0] lines
need to have pullups enabled from SD card side.
If you are using 1-bit (SPI) mode probably the best
is to explicitely drive 1 unused bits sd_d[2:1] = 2'b11
…On 6/12/21, developandplay ***@***.***> wrote:
I got SPI mode to work in Litex but had no luck with SDIO mode.
Is that supported?
If yes do you have some sample code for it?
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
#16
|
additional explaination
If you want to use 4-bit mode then all sd_d[3:0] lines
need to have pullups enabled from FPGA constraints.
For pullups to be active, all sd_d lines must be used in the
design (connected to some logic).
If any sd_d line is not connected anywhere the pullup
will be also removed by router/optimizer.
…On 6/12/21, D EMARD ***@***.***> wrote:
If you want to use 4-bit mode then all sd_d[3:0] lines
need to have pullups enabled from SD card side.
If you are using 1-bit (SPI) mode probably the best
is to explicitely drive 1 unused bits sd_d[2:1] = 2'b11
On 6/12/21, developandplay ***@***.***> wrote:
> I got SPI mode to work in Litex but had no luck with SDIO mode.
> Is that supported?
> If yes do you have some sample code for it?
>
> --
> You are receiving this because you are subscribed to this thread.
> Reply to this email directly or view it on GitHub:
> #16
|
Similar holds for FLASH. If it is used in 1-bit mode,
unused lines must be driven 1
pullup is not enough for flash, unused lines must be driven
1. If unused lines are left floating. line crosstalk will happen
and some FLASH chips will work, but some will be confused by
crosstalk noise and will not work making FLASH boot not work
for all users and boards.
…On 6/13/21, D EMARD ***@***.***> wrote:
additional explaination
If you want to use 4-bit mode then all sd_d[3:0] lines
need to have pullups enabled from FPGA constraints.
For pullups to be active, all sd_d lines must be used in the
design (connected to some logic).
If any sd_d line is not connected anywhere the pullup
will be also removed by router/optimizer.
On 6/12/21, D EMARD ***@***.***> wrote:
> If you want to use 4-bit mode then all sd_d[3:0] lines
> need to have pullups enabled from SD card side.
>
> If you are using 1-bit (SPI) mode probably the best
> is to explicitely drive 1 unused bits sd_d[2:1] = 2'b11
>
>
> On 6/12/21, developandplay ***@***.***> wrote:
>> I got SPI mode to work in Litex but had no luck with SDIO mode.
>> Is that supported?
>> If yes do you have some sample code for it?
>>
>> --
>> You are receiving this because you are subscribed to this thread.
>> Reply to this email directly or view it on GitHub:
>> #16
>
|
What does this comment mean?
|
SD card is shared (connected together) with FPGA and ESP32.
sd_d[2] goes to esp32 wifi_gpio12
SD default is normally all pins pull up, but factory default
ESP32 has internal pull down to wifi_gpio12 to boot properly,
that's why FPGA sets pull to none to let esp32 boot. wifi_gpio12
controls the voltage (1.8V or 3.3V) esp32 will apply to its internal flash.
ESP32 efuse can be programmed to apply 3.3V and
ignore wifi_gpio12 - that's described in the manual.
efuse is one-time-programmable, setting can't be undone
so users must be careful not to brick esp32
…On 6/15/21, developandplay ***@***.***> wrote:
What does this comment mean?
> IOBUF PORT "sd_d[2]" PULLMODE=NONE IO_TYPE=LVCMOS33 DRIVE=4; # WiFi
> GPIO12 pulldown bootstrapping without 3.3V efuse
--
You are receiving this because you commented.
Reply to this email directly or view it on GitHub:
#16 (comment)
|
Just to make sure I understand correctly: |
If you have board from CrowdSupply - then efuse is already set (burned) to 3.3V as this is done in the selftest script before delivery |
I got mine on Mouser and the ESP32-WROOM-32 is used if that makes a difference... |
You can see if 3.3V efuse is already set when esptool.py programs the esp32
it will show "VRef calibration in efuse",
Features: WiFi, BT, Dual Core, 240MHz, VRef calibration in efuse,
Coding Scheme None
that means that gpio12 is free to be used regardless of its powern on
pull up/down state.
Usualy problem is that some SD cards do internal pull ups and prevent
esp32 from booting or programming when SD is inserted.
to prevent user's problems intergalaktik burns efuse to
correct state before shipment
…On 6/16/21, developandplay ***@***.***> wrote:
I got mine on Mouser and the ESP32-WROOM-32 is used if that makes a
difference...
--
You are receiving this because you commented.
Reply to this email directly or view it on GitHub:
#16 (comment)
|
I got SPI mode to work in Litex but had no luck with SDIO mode.
Is that supported?
If yes do you have some sample code for it?
The text was updated successfully, but these errors were encountered: