SD/MMC testing

classic Classic list List threaded Threaded
14 messages Options
Dado Sutter Dado Sutter
Reply | Threaded
Open this post in threaded view
|

SD/MMC testing

Hi,
   We're trying again to make Jesus Alvarez' SD/MMC module (it's not actually a module :) work on our EK-LM3S8962.
   Alvarez has helped us a lot with some tips but it is stil not working here.
   Before going deeper on this, I just wanted to make sure that at least one of you have indeed made it work on an LM-3S8962 platform. (Alvarez original work was done to a Micromint eagle-100 board)
   The answer may be in the (LM3S) platform-specific code but I think I remember reading that someone has tested it ok on an LM3S platform.

Thanks !
Dado

  

_______________________________________________
Elua-dev mailing list
[hidden email]
https://lists.berlios.de/mailman/listinfo/elua-dev
jbsnyder jbsnyder
Reply | Threaded
Open this post in threaded view
|

Re: SD/MMC testing

I'm still out of town so I can't check that everything still works but  
I did have it working on an lm3s8965 eval kit with what is probably  
the most recent version of that branch.

Perhaps the issue might be related to pin assignment?

We should develop a plan for genericising the code to other spi or  
sdio peripherals so we can land the support for this in the trunk.

The post 0.6 release might be pretty major :)

--
James Snyder
Biomedical Engineering
Northwestern University
http://fanplastic.org/key.txt
ph: (847) 448-0386

On Jul 27, 2009, at 2:14 PM, Dado Sutter <[hidden email]> wrote:

> Hi,
>    We're trying again to make Jesus Alvarez' SD/MMC module (it's not  
> actually a module :) work on our EK-LM3S8962.
>    Alvarez has helped us a lot with some tips but it is stil not  
> working here.
>    Before going deeper on this, I just wanted to make sure that at  
> least one of you have indeed made it work on an LM-3S8962 platform.  
> (Alvarez original work was done to a Micromint eagle-100 board)
>    The answer may be in the (LM3S) platform-specific code but I  
> think I remember reading that someone has tested it ok on an LM3S  
> platform.
>
> Thanks !
> Dado
>
>
> _______________________________________________
> Elua-dev mailing list
> [hidden email]
> https://lists.berlios.de/mailman/listinfo/elua-dev
_______________________________________________
Elua-dev mailing list
[hidden email]
https://lists.berlios.de/mailman/listinfo/elua-dev
Bittencourt Bittencourt
Reply | Threaded
Open this post in threaded view
|

Re: SD/MMC testing

It seems to be working on my LM3S8962 too...
from the last revision on the MMC branch.

--Pedro Bittencourt


On Mon, Jul 27, 2009 at 11:46 PM, <[hidden email]> wrote:
I'm still out of town so I can't check that everything still works but
I did have it working on an lm3s8965 eval kit with what is probably
the most recent version of that branch.

Perhaps the issue might be related to pin assignment?

We should develop a plan for genericising the code to other spi or
sdio peripherals so we can land the support for this in the trunk.

The post 0.6 release might be pretty major :)

--
James Snyder
Biomedical Engineering
Northwestern University
http://fanplastic.org/key.txt
ph: (847) 448-0386

On Jul 27, 2009, at 2:14 PM, Dado Sutter <[hidden email]> wrote:

> Hi,
>    We're trying again to make Jesus Alvarez' SD/MMC module (it's not
> actually a module :) work on our EK-LM3S8962.
>    Alvarez has helped us a lot with some tips but it is stil not
> working here.
>    Before going deeper on this, I just wanted to make sure that at
> least one of you have indeed made it work on an LM-3S8962 platform.
> (Alvarez original work was done to a Micromint eagle-100 board)
>    The answer may be in the (LM3S) platform-specific code but I
> think I remember reading that someone has tested it ok on an LM3S
> platform.
>
> Thanks !
> Dado
>
>
> _______________________________________________
> Elua-dev mailing list
> [hidden email]
> https://lists.berlios.de/mailman/listinfo/elua-dev
_______________________________________________
Elua-dev mailing list
[hidden email]
https://lists.berlios.de/mailman/listinfo/elua-dev


_______________________________________________
Elua-dev mailing list
[hidden email]
https://lists.berlios.de/mailman/listinfo/elua-dev
Dado Sutter Dado Sutter
Reply | Threaded
Open this post in threaded view
|

Re: SD/MMC testing

Just as a follow-up for this thread, here goes some more info:

- The revision Pedro has used is not the last on the eagle_mmc branch but rev 201
- He did not test running a program or accessing data on the mmc card
- In his tests, he used a cellphone pre-formatted card and WAS able to list it's files with the (lua shell) ls command.

- We're testing here with the same rev 201 and the /mmc device IS beeing recognized now by the ls command (!!!). This does NOT work if I build the last revision from the eagle-mmc branch (I did not understand exactly Snyder's rev 202 commit on this branch, merging with trunk but I don't know if it is related to the problem)
- We CANNOT see any files on our card with the ls command though :(
- We've tested with FAT and FAT32 formatting. And yes, the files have short (DOS) names
- We've also tested with some cellphone cards and no file is ever listed
- It could be some hardware (SPI) problem accessing the cards but it is unlikely, as we've tested in two differente EK-LM3S8962 boards (yes ! other researchers and students here are buying them to run eLua too :)

Next steps will be testing in on Pedro's image and maybe in his board too.
Can't wait to have SD/MMC working here ! :)

Best
Dado





On Tue, Jul 28, 2009 at 00:58, Pedro Bittencourt <[hidden email]> wrote:
It seems to be working on my LM3S8962 too...
from the last revision on the MMC branch.

--Pedro Bittencourt



On Mon, Jul 27, 2009 at 11:46 PM, <[hidden email]> wrote:
I'm still out of town so I can't check that everything still works but
I did have it working on an lm3s8965 eval kit with what is probably
the most recent version of that branch.

Perhaps the issue might be related to pin assignment?

We should develop a plan for genericising the code to other spi or
sdio peripherals so we can land the support for this in the trunk.

The post 0.6 release might be pretty major :)

--
James Snyder
Biomedical Engineering
Northwestern University
http://fanplastic.org/key.txt
ph: (847) 448-0386

On Jul 27, 2009, at 2:14 PM, Dado Sutter <[hidden email]> wrote:

> Hi,
>    We're trying again to make Jesus Alvarez' SD/MMC module (it's not
> actually a module :) work on our EK-LM3S8962.
>    Alvarez has helped us a lot with some tips but it is stil not
> working here.
>    Before going deeper on this, I just wanted to make sure that at
> least one of you have indeed made it work on an LM-3S8962 platform.
> (Alvarez original work was done to a Micromint eagle-100 board)
>    The answer may be in the (LM3S) platform-specific code but I
> think I remember reading that someone has tested it ok on an LM3S
> platform.
>
> Thanks !
> Dado
>
>
> _______________________________________________
> Elua-dev mailing list
> [hidden email]
> https://lists.berlios.de/mailman/listinfo/elua-dev
_______________________________________________
Elua-dev mailing list
[hidden email]
https://lists.berlios.de/mailman/listinfo/elua-dev


_______________________________________________
Elua-dev mailing list
[hidden email]
https://lists.berlios.de/mailman/listinfo/elua-dev



_______________________________________________
Elua-dev mailing list
[hidden email]
https://lists.berlios.de/mailman/listinfo/elua-dev
Jesus Alvarez Jesus Alvarez
Reply | Threaded
Open this post in threaded view
|

Re: SD/MMC testing

Dado,

The last rev on the eagle_mmc branch is rev 269 from March-26-2009. I
tested it before updating the branch. I did not test rev 202. Possibly
you should consider using rev 269 instead of rev 202.

The archive of rev 277 of the main branch with the eagle_mmc changes was
also tested.

At some point those MMC changes should be merged with the main branch.
It is up to rev 366 so there are have been many changes since the last
update. Doing the changes manually tends to be very error prone.

Regards,
Jesus Alvarez

_______________________________________________
Elua-dev mailing list
[hidden email]
https://lists.berlios.de/mailman/listinfo/elua-dev
Jesus Alvarez Jesus Alvarez
Reply | Threaded
Open this post in threaded view
|

Re: SD/MMC testing

Dado,

Another possible test would be to run the sd_card example from the
StellarisWare driver library on your board. That uses the same FatFs
module as the eagle_mmc changes. If you can read files on a a microSD
card using 'ls' and 'cat' in the sd_card example, they should be
readable from eLua.

Regards,
Jesus Alvarez

_______________________________________________
Elua-dev mailing list
[hidden email]
https://lists.berlios.de/mailman/listinfo/elua-dev
jbsnyder jbsnyder
Reply | Threaded
Open this post in threaded view
|

Re: SD/MMC testing

In reply to this post by Jesus Alvarez
I think what I did back then with the merge was just insert changes on  
trunk since the original sdmmc branch. I'm pretty sure I tested it  
after the merge and had it going on my lm3s6965 but I can't say I did  
any extensive testing at that stage.

Bringing it in line with the current trunk should probably be  
relatively painless since I don't think there have been any overhauls  
of the sections the branch modifies. I'll do some testing in the next  
couple of days once i'm back in town.

--
James Snyder
Biomedical Engineering
Northwestern University
http://fanplastic.org/key.txt
ph: (847) 448-0386

On Jul 28, 2009, at 12:38 PM, Jesus Alvarez <[hidden email]>  
wrote:

> Dado,
>
> The last rev on the eagle_mmc branch is rev 269 from March-26-2009. I
> tested it before updating the branch. I did not test rev 202. Possibly
> you should consider using rev 269 instead of rev 202.
>
> The archive of rev 277 of the main branch with the eagle_mmc changes  
> was
> also tested.
>
> At some point those MMC changes should be merged with the main branch.
> It is up to rev 366 so there are have been many changes since the last
> update. Doing the changes manually tends to be very error prone.
>
> Regards,
> Jesus Alvarez
>
> _______________________________________________
> Elua-dev mailing list
> [hidden email]
> https://lists.berlios.de/mailman/listinfo/elua-dev
_______________________________________________
Elua-dev mailing list
[hidden email]
https://lists.berlios.de/mailman/listinfo/elua-dev
jbsnyder jbsnyder
Reply | Threaded
Open this post in threaded view
|

Re: SD/MMC testing

In reply to this post by Jesus Alvarez
OK, I have updated the eagle_mmc branch with the latest work in the  
trunk now.  It's certainly possible that I've made some mistakes on  
the merge, but I am able to run scripts off of a microSD card on my EK-
LM3S6965, and I know that it is picking up versions on the card  
because I have left older versions on there that it now complains  
about syntax on.

It looks like the code for interacting with an SD card is just using  
SPI, and therefore I suppose that it should be pretty easy to adapt it  
to use the platform SPI so that it should work on other platforms  
(will test this since I have an SD breakout board that I intend to  
test with STM32).

One interesting thing of note that I've seen when poking around for  
info on SD is that for microSD SPI mode is optional?  How does one  
know if the cards one is ordering then actually support SPI mode  
communication?  I guess that the Kingston 1GB card I've got supports  
it, since otherwise I wouldn't be able to read/write.  Anyone have any  
anecdotes on this?  It seems like SecureMMC, SD, SDIO & miniSD are no  
problem and are supposed to support SPI mode communication.

I wonder if this has any relation to some of the issues Dado has been  
experiencing?  (not sure if you've been using microSD or not, and it  
sounds like there's some variation of functionality depending on the  
SVN revision being used).

Best.

-jsnyder

On Jul 28, 2009, at 3:29 PM, Jesus Alvarez wrote:

> Dado,
>
> The last rev on the eagle_mmc branch is rev 269 from March-26-2009. I
> tested it before updating the branch. I did not test rev 202. Possibly
> you should consider using rev 269 instead of rev 202.
>
> The archive of rev 277 of the main branch with the eagle_mmc changes  
> was
> also tested.
>
> At some point those MMC changes should be merged with the main branch.
> It is up to rev 366 so there are have been many changes since the last
> update. Doing the changes manually tends to be very error prone.
>
> Regards,
> Jesus Alvarez
>
> _______________________________________________
> Elua-dev mailing list
> [hidden email]
> https://lists.berlios.de/mailman/listinfo/elua-dev
--
James Snyder
Biomedical Engineering
Northwestern University
[hidden email]
http://fanplastic.org/key.txt
ph: 847.448.0386





_______________________________________________
Elua-dev mailing list
[hidden email]
https://lists.berlios.de/mailman/listinfo/elua-dev

smime.p7s (5K) Download Attachment
Jesus Alvarez Jesus Alvarez
Reply | Threaded
Open this post in threaded view
|

Re: SD/MMC testing

Hi, Dado.

Were you able to access the microSD card? If so, what turned out to be
the problem? If not, were you able to read it using the sd_card example
from the StellarisWare driver library?

Regards,
Jesus Alvarez

_______________________________________________
Elua-dev mailing list
[hidden email]
https://lists.berlios.de/mailman/listinfo/elua-dev
Dado Sutter Dado Sutter
Reply | Threaded
Open this post in threaded view
|

Re: SD/MMC testing

Hello Guys,

On Tue, Aug 11, 2009 at 16:33, Jesus Alvarez <[hidden email]> wrote:
Hi, Dado.

Hello Alvarez,

Were you able to access the microSD card?

No, not yet :(
 
If so, what turned out to be
the problem?

I have no idea yet.
The files on the card are not seen by ls/dir.
We have tested the same microSD card in an image built by Pedro, with which he has reported to have been able to "see" some files (not Lua programs though, because he took stole the card from his mother's cell phone :)

If not, were you able to read it using the sd_card example
from the StellarisWare driver library?

We did not test this.
But I think we have reduced the possibility of kit hardware errors, because I've tested your eagle_mmc image in at least 3 different LM3S8962 boards.

I'll be out of the lab until next monday night :(

Tks for the help.

Regards,
Jesus Alvarez

Best
Dado
 


_______________________________________________
Elua-dev mailing list
[hidden email]
https://lists.berlios.de/mailman/listinfo/elua-dev


_______________________________________________
Elua-dev mailing list
[hidden email]
https://lists.berlios.de/mailman/listinfo/elua-dev
Jesus Alvarez Jesus Alvarez
Reply | Threaded
Open this post in threaded view
|

Re: SD/MMC testing

 >> If not, were you able to read it using the sd_card example
 >> from the StellarisWare driver library?
 >
 > We did not test this.

That is a very simple test and would confirm if your microSD card is
working properly. The eagle_mmc branch uses the same FatFs module used
by the StellarisWare sd_card example. If the sd_card example works, the
eLua MMC functionality should work too.

 > But I think we have reduced the possibility of kit hardware
 > errors, because I've tested your eagle_mmc image in at least
 > 3 different LM3S8962 boards.

The image I use for testing is built for a Micromint Eagle with the
LM3S6918 processor. You need to rebuild from source for your target
board. The MMC driver uses the SPI interface. The SPI chip select pin
used for MMC on your LM3S8962 card is not the same. A binary image built
for a board that uses a different SPI port or a different SPI chip
select will not work on your board.

Regards,
Jesus Alvarez

_______________________________________________
Elua-dev mailing list
[hidden email]
https://lists.berlios.de/mailman/listinfo/elua-dev
Dado Sutter Dado Sutter
Reply | Threaded
Open this post in threaded view
|

Re: SD/MMC testing



On Tue, Aug 11, 2009 at 21:21, Jesus Alvarez <[hidden email]> wrote:
That is a very simple test and would confirm if your microSD card is
working properly. The eagle_mmc branch uses the same FatFs module used
by the StellarisWare sd_card example. If the sd_card example works, the
eLua MMC functionality should work too.

Tks Alvarez. I will try to find some time to do this asap.
 
The image I use for testing is built for a Micromint Eagle with the
LM3S6918 processor. You need to rebuild from source for your target
board.

Sure. I've built it several times for our EK-LM3S8962
The image Pedro used was a bit different though, built from an old version of the eagle_mmc branch.
I'll retry with you recent updates now.

The MMC driver uses the SPI interface. The SPI chip select pin
used for MMC on your LM3S8962 card is not the same. A binary image built
for a board that uses a different SPI port or a different SPI chip
select will not work on your board.

I see it, tks.
I haven't checked but I assume that using board=EK-LM3S8962 as the scons'  target, the SPI CS pin will be defined right, as more people have reported successful tests on this kit too.

Regards,
Jesus Alvarez

Best Regards,
Dado
 


_______________________________________________
Elua-dev mailing list
[hidden email]
https://lists.berlios.de/mailman/listinfo/elua-dev


_______________________________________________
Elua-dev mailing list
[hidden email]
https://lists.berlios.de/mailman/listinfo/elua-dev
jbsnyder jbsnyder
Reply | Threaded
Open this post in threaded view
|

Re: SD/MMC testing

In reply to this post by Jesus Alvarez

On Aug 11, 2009, at 7:21 PM, Jesus Alvarez wrote:

>>> If not, were you able to read it using the sd_card example
>>> from the StellarisWare driver library?
>>
>> We did not test this.
>
> That is a very simple test and would confirm if your microSD card is
> working properly. The eagle_mmc branch uses the same FatFs module used
> by the StellarisWare sd_card example. If the sd_card example works,  
> the
> eLua MMC functionality should work too.
This is a good idea.

Also, I've put in a commit on this branch that may help.  Around  
January I recall when I first started using eLua I recall having some  
issues with defines like the following not always behaving reliably:  
having CFLAGS with -DELUA_CPU=LM3S6965, and then later checking #if  
ELUA_CPU == LM3S6965.  I've switched the defines in the mmc.c file to  
use the FOR* style instead (i.e.: FORLM3S6965 is defined, and an ifdef  
is used). I'm not sure what the preprocessor does in all cases when  
one defines a variable with a token that hasn't been defined before.  
This should be adjusted a little further by making this specific to  
the board rather than the chip, but it would be interesting to know if  
it makes any difference.

-jsnyder


--
James Snyder
Biomedical Engineering
Northwestern University
[hidden email]
http://fanplastic.org/key.txt
ph: 847.448.0386





_______________________________________________
Elua-dev mailing list
[hidden email]
https://lists.berlios.de/mailman/listinfo/elua-dev

smime.p7s (5K) Download Attachment
Dado Sutter Dado Sutter
Reply | Threaded
Open this post in threaded view
|

Re: SD/MMC testing

I'll be some 1200Km from my EK-LM3S8962 until next monday night :(
But maybe someone in the Lab can work a bit on this before that.
Tks for the ideas and for the commit.

Best
Dado


On Wed, Aug 12, 2009 at 13:50, James Snyder <[hidden email]> wrote:

On Aug 11, 2009, at 7:21 PM, Jesus Alvarez wrote:

If not, were you able to read it using the sd_card example
from the StellarisWare driver library?

We did not test this.

That is a very simple test and would confirm if your microSD card is
working properly. The eagle_mmc branch uses the same FatFs module used
by the StellarisWare sd_card example. If the sd_card example works, the
eLua MMC functionality should work too.

This is a good idea.

Also, I've put in a commit on this branch that may help.  Around January I recall when I first started using eLua I recall having some issues with defines like the following not always behaving reliably: having CFLAGS with -DELUA_CPU=LM3S6965, and then later checking #if ELUA_CPU == LM3S6965.  I've switched the defines in the mmc.c file to use the FOR* style instead (i.e.: FORLM3S6965 is defined, and an ifdef is used). I'm not sure what the preprocessor does in all cases when one defines a variable with a token that hasn't been defined before.  This should be adjusted a little further by making this specific to the board rather than the chip, but it would be interesting to know if it makes any difference.

-jsnyder



--
James Snyder
Biomedical Engineering
Northwestern University
[hidden email]
http://fanplastic.org/key.txt
ph: 847.448.0386





_______________________________________________
Elua-dev mailing list
[hidden email]
https://lists.berlios.de/mailman/listinfo/elua-dev



_______________________________________________
Elua-dev mailing list
[hidden email]
https://lists.berlios.de/mailman/listinfo/elua-dev