SPI on LPC1768 (mbed)

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

SPI on LPC1768 (mbed)

I tried running a test chunk setting an SPI port on the mbed platform.

This yielded:

eLua# lua /rom/test_W5200.lc 1 1000000
Press CTRL+Z to exit Lua
lua: ?:1646294131: attempt to index global 'spi' (a nil value)
stack traceback:
        ?:1646294131: in main chunk
        [C]: ?

I am running elua version 0.9

The eLua site indicates that SPI on the LPC1768 is implemented, but not fully tested. Has SPI been implemented for the LPC1768 ?

--
Tom Freund





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

Re: SPI on LPC1768 (mbed)

On 07/01/2014, Tom Freund <[hidden email]> wrote:
> I tried running a test chunk setting an SPI port on the mbed platform.
>
> This yielded:
> lua: ?:1646294131: attempt to index global 'spi' (a nil value)

Hi Tom
  This error means that the "spi" module was not enabled in your firmware.
What firmware are you running?

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

Re: SPI on LPC1768 (mbed)

The chunk was constructed with build_elua.lua using the MBED option for the platform. 

It used the codesourcery toolchain.


On Tue, Jan 7, 2014 at 2:33 PM, Martin Guy <[hidden email]> wrote:
On 07/01/2014, Tom Freund <[hidden email]> wrote:
> I tried running a test chunk setting an SPI port on the mbed platform.
>
> This yielded:
> lua: ?:1646294131: attempt to index global 'spi' (a nil value)

Hi Tom
  This error means that the "spi" module was not enabled in your firmware.
What firmware are you running?

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



--
Tom Freund

dig.y.SoL

"Systems overseeing 
public and private
infrastructure"

LinkedIn - http://www.linkedin/in/digysol
Voice - 860-232-1614





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

Re: SPI on LPC1768 (mbed)

In reply to this post by Tom Freund
Hi,


On Tue, Jan 7, 2014 at 8:58 PM, Tom Freund <[hidden email]> wrote:
I tried running a test chunk setting an SPI port on the mbed platform.

This yielded:

eLua# lua /rom/test_W5200.lc 1 1000000
Press CTRL+Z to exit Lua
lua: ?:1646294131: attempt to index global 'spi' (a nil value)

That 1646294131 looks quite weird. Are you sure you are cross-compiling correctly? Can you run the source instead of running the precompiled bytecode?
To check if you have "spi" compiled in the image:

elua# lua
> print(spi)

Best,
Bogdan

stack traceback:
        ?:1646294131: in main chunk
        [C]: ?

I am running elua version 0.9

The eLua site indicates that SPI on the LPC1768 is implemented, but not fully tested. Has SPI been implemented for the LPC1768 ?

--
Tom Freund





_______________________________________________
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