I am trying to write a bare metal application for A20-SOM as "exercise"... if I can call it like that. I am trying to not use linux.
Now i'm at the point that i should read/write data from/to sdcard. Actually the point is that i know nothing about how to do that, cause i never did it before at this (hardware) level.
So i should write an sdcard driver, or find a piece of code that can be used on bare metal, without dependencies.
On A20 documentation i didnt find detailed informations, its just written that sdcard is mapped on memory at that address and complies with this and that standard.
Can you please guide me to a detailed description of the A20/sdcard software interface?
thanks a lot
Quote from: beddueimpossibile on April 24, 2015, 07:35:17 PM
So i should write an sdcard driver, or find a piece of code that can be used on bare metal, without dependencies.
On A20 documentation i didnt find detailed informations, its just written that sdcard is mapped on memory at that address and complies with this and that standard.
I don't know if there is any publicly available hardware info on the A20 SD Card interface. If there is, I'd be interested in it too.
You could take a look at the linux kernel sources and see how it is handled there. See drivers/mmc/host/sunxi-mmc.c. The boot ROM on the device can also read sdcards. Some kind soul has disassembled it: see http://linux-sunxi.org/Boot This code is ARM assembly, but because it must fit the BROM, it is quite simple.
The linux-sunxi.org site contains a lot of interesting other stuff too.
Try the U-Boot source code, it's easier :)
John
Thank you guys, at least now i know that i have to dig a little bit deeper to find what i'm looking for.
I will follow your suggestions and if i manage to do it, i will share the results.
Hope to come back soon with good news!