Mounting/Accessing SD-Card on BBB

Nils Hölscher nilhoel1 at gmail.com
Tue Aug 13 11:30:44 UTC 2019


Hi,

Thanks for the help.
I tried to use your code, but I always get "ERROR: SD could not be mounted
after timeout".
Even after raising the waiting time.

The sources I use start here:
https://github.com/nilhoel1/rtems-pru/blob/pruss-shell/main.c#L110

And my uart output is:
""
waiting for SD...

usbus0: 480Mbps High Speed USB v2.0
usbus1: 480Mbps High Speed USB v2.0
media listener: event = DISK ATTACH, state = INQUIRY, src = mmcsd
media listener: event = DISK ATTACH, state = SUCCESS, src = mmcsd, dest =
/dev/mmcsd-0
media listener: event = MOUNT, state = INQUIRY, src = /dev/mmcsd-0
ugen0.1: <Mentor Graphics OTG Root HUB> at usbus0
ugen1.1: <Mentor Graphics OTG Root HUB> at usbus1
uhub0: <Mentor Graphics OTG Root HUB, class 9/0, rev 2.00/1.00, addr 1> on
usbus0
uhub1: <Mentor Graphics OTG Root HUB, class 9/0, rev 2.00/1.00, addr 1> on
usbus1
media listener: event = MOUNT, state = FAILED, src = /dev/mmcsd-0
media listener: event = PARTITION INQUIRY, state = INQUIRY, src =
/dev/mmcsd-0
media listener: event = PARTITION INQUIRY, state = SUCCESS, src =
/dev/mmcsd-0
media listener: event = PARTITION ATTACH, state = INQUIRY, src =
/dev/mmcsd-0
media listener: event = PARTITION ATTACH, state = SUCCESS, src =
/dev/mmcsd-0, dest = /dev/mmcsd-0-0
media listener: event = MOUNT, state = INQUIRY, src = /dev/mmcsd-0-0
media listener: event = MOUNT, state = FAILED, src = /dev/mmcsd-0-0
media listener: event = DISK ATTACH, state = INQUIRY, src = mmcsd
media listener: event = DISK ATTACH, state = SUCCESS, src = mmcsd, dest =
/dev/mmcsd-1
media listener: event = MOUNT, state = INQUIRY, src = /dev/mmcsd-1
media listener: event = MOUNT, state = FAILED, src = /dev/mmcsd-1
media listener: event = PARTITION INQUIRY, state = INQUIRY, src =
/dev/mmcsd-1
media listener: event = PARTITION INQUIRY, state = SUCCESS, src =
/dev/mmcsd-1
media listener: event = PARTITION ATTACH, state = INQUIRY, src =
/dev/mmcsd-1
media listener: event = PARTITION ATTACH, state = SUCCESS, src =
/dev/mmcsd-1, dest = /dev/mmcsd-1-0
media listener: event = MOUNT, state = INQUIRY, src = /dev/mmcsd-1-0
media listener: event = MOUNT, state = FAILED, src = /dev/mmcsd-1-0
media listener: event = DISK ATTACH, state = INQUIRY, src = mmcsd1boot
uhub0: 1 port with 1 removable, self powered
uhub1: 1 port with 1 removable, self powered
ERROR: SD could not be mounted after timeout
""

Thanks,
Nils

On Mon, 12 Aug 2019 at 18:01, Christian Mauderer <list at c-mauderer.de> wrote:

> On 12/08/2019 07:28, Nils Hölscher wrote:
> > Hi,
> >
> > Can anyone help me with this?
> > I need to access the BBB's SD-Card, so that I can load my pru example on
> > the pru.
> >
> > Thanks,
> > Nils
> >
>
> Hello Nils,
>
> take a look at the following application:
>
>
> https://gitlab.com/c-mauderer/rtems-bbb/blob/master/apps/wifi-sample/init.c#L64
>
>
> https://gitlab.com/c-mauderer/rtems-bbb/blob/master/apps/wifi-sample/libbsdhelper.c#L122
>
> You should mainly need the stuff from the libbsdhelper_init_sd_card()
> and libbsdhelper_wait_for_sd().
>
> Please note that the SD card needs quite some time to initialize on BBB.
> I haven't had a look at it why that is the case.
>
> Best regards
>
> Christian
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/users/attachments/20190813/feb1b5d7/attachment-0002.html>


More information about the users mailing list