-
Notifications
You must be signed in to change notification settings - Fork 127
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
Question about reading sd card #91
Comments
Sounds like a conflict between GPIO_0 and GPIO_2 but I don't think retro-go uses GPIO_0 for anything. It could be initialized by mistake, though. Or maybe the esplay-micro firmware configures GPIO_0 it in a specific way and we don't do the same. Do you know why the esplay-micro has a jumper to link GPIO_0 and GPIO_2 to begin with? That might help me understand what's going on here. |
Also maybe @Cralex knows more, he made the port to the micro. |
I think IO0 and IO2 connections are used to flash. When this jumper is connected, the computer can directly flash firmware to esp32, but not when it is disconnected. |
I used the esp-idf sdmmc example to test sd card reading without removing the jumper. It worked. |
I did a fresh clone of the project and tried compiling it, and everything seems to be working fine on my end. (I was worried that I'd pushed something broken since my initial port was done on a time crunch.) Are you saying that it works normally with the stock firmware but not Retro-Go, or that it seems to work on Retro-Go but that it doesn't work with some command-line utilities? Regrettably, I don't know much at all when it comes to low-level esp32 stuff or the actual device schematics, so my only frame of reference when porting Retro-Go has been if the end-user experience works or not. It's quite possible that something else isn't set up right. Finally, you're working with this hardware, right? There's more than one esplay micro revision but I only have the v2 to test against. |
Can you share the entire serial log from the time you power it until the error appears? I'm curious if the card gets mounted successfully but errors out later. |
It works normally with pebri86‘s firmware. Retro-go also can works normally, but need remove jumper. I just wanna solve this problem. |
Yes.
|
So the card mounts successfully and trying to read the settings files causes no error. But later there are errors when it tries to read the clock file. Quite a bit happens between the two but mainly display init and audio init. I guess it must be one of those causing all the issues? The easiest one to test would be audio. In If the following error is gone after the change, then I guess we're doing something stupid during audio init.
|
You are right.
Then i just remove Thanks a lot! |
You can try disabling Other than that, the only difference I see between esplay firmware and retro-go would be that they do I don't see how it relates to GPIOs but I guess it's worth a try? replacing 0 by ESP_INTR_FLAG_LEVEL1 (it's the one at line 129) |
I've tried both methods, no lucky, it doesn't work. I also tried modifying other configuration values, still not work. Is there a way to detect where the code is running and there is an error in sd reading? |
I don't think it matters what code causes the error to show up, the issue is at a lower level. But if I follow the code path taken by this particular log:
Then those errors are probably triggered by:
|
Thanks. I'll look into it. |
Recently I compiled this project for esplay-micro but cannot read the sd card file.
Reading sd card file by 1bitmode(clk 14, cmd 15, d0 2)
The Serial show the following error:
sdmmc_cmd: sdmmc_read_sectors_dma: sdmmc_send_cmd return 0x109
diskio_sdmmc: sdmmc_read_blocks failed (265)
Then I found a solution. By removing the jumper between IO0 and IO2, I can read the SD card normally.
But when I use esplay-micro firmware, I can read SD card files normally without removing the jumper.
WHY? Is there a way to read normally without removing the jumper?
The text was updated successfully, but these errors were encountered: