Trouble with MMCFS on LM3s9B96.

classic Classic list List threaded Threaded
4 messages Options
Roman Roman
Reply | Threaded
Open this post in threaded view
|

Trouble with MMCFS on LM3s9B96.

Hi,

I have problem (probably my configuration is bad) with MMCFS on lm3s9b92 (eLUA v0.9).
So, in board configuration I put:
    mmcfs = {spi = 0, cs_port = 0, cs_pin = 3 },
(Does it mean that cs_port is on port A ?)
and I added spi:
  modules = {
    generic = { 'all_lua', '-bit', 'can', 'pack', 'pd', 'pwm', 'spi', 'term', 'tmr', '-uart', '-cpu', 'pio', '-i2c', '-net', '-adc', '-mrpc', 'mpio'}
  }
That's all my configuration in MMCFS issue, so maybe I missed something (MOSI/MISO pin configuration etc.)?

The result is:
eLua# lua /mmc/info.lua                                                        
Press CTRL+Z to exit Lua                                                        
lua: cannot open /mmc/info.txt: No such file or directory    

Maybe I have small mistake, so I prefer to ask before I will make changes in source of eLUA.

Best,
Roman
Roman Roman
Reply | Threaded
Open this post in threaded view
|

Re: Trouble with MMCFS on LM3s9B96.

There is information on eLUA forum - how to open txt file from SD card:
"Similarly, if you wanted to access a text file a.txt from your card, you could use fopen like this:
 f = fopen( "/mmc/a.txt", "rb" )"
Can I use fopen() in eLUA script ?
jbsnyder jbsnyder
Reply | Threaded
Open this post in threaded view
|

Re: Trouble with MMCFS on LM3s9B96.

In reply to this post by Roman
Hi Roman,

Yes, that would put you on Port A, pin 3 for the CS pin.  Looking at the platform.c it looks like SPI interface 0 should be set to have the CLK on Port A2, and MISO/MOSI on A4 and A5.

Do you have a scope that you could use to check that the clock line is doing anything at startup?

Is this on a 9b92 or a 9b96.   I believe we've built on 9b92 before for the eval kit, but haven't tested it with an SD card. The 9b96 would definitely need some minor work since it's not referenced in the platform files.

Also the "ls" command from the eLua# shell should list the contents of the mmcfs.

Best.

-jsnyder
Roman Roman
Reply | Threaded
Open this post in threaded view
|

Re: Trouble with MMCFS on LM3s9B96.

Hi Jsnyder,

thanks for answer. I have two boards - one with 9b92 and one with 9b96. I was testing(I made eLua version for 9b96) SDcard on both boards and nothing worked. After the while I figured out that the problem wasn't eLua code but the socket of SDcard was bad. Now I repaired SDcard socket and everything work perfectly :).

thanks for support.

Best,
Roman