Jump to content
igor

eLua for Stellaris Launchpad

Recommended Posts

Well having tested my MSP430 lib for the MCP2515 in loopback and then with real transceiver HW, there are undoubtedly a bunch of statuses and errors to handle you never get to see in loopback mode :D. I also have a Saleae Logic16 which has CAN analysis in its software (my goodness that was indispensible btw) so it'll be fun.

Share this post


Link to post
Share on other sites

I checked out the elua website and it looks very interesting. Since I have a LM3S8962 kit and it appears trivial to flash it to that board, I think I will give this a go.  Looks like most of the boards peripherals are supported, even the OLED display.

Share this post


Link to post
Share on other sites

Turns out it was really fast and easy to do.  Installed the LMflash program, downloaded the eLua image from the eLuaprojects.net website, flashed the board, fired up a terminal program and had an eLua# prompt. Total time was less than 10 minutes.

 

What really took some time was finding the frequency parameter that was needed to initialize the OLED display (1Mhz).  Once I had that I was able to interactively write to the display. Also sent tones to the on board speaker via PWM.

 

@@igor , the interactive nature is indeed cool when playing with the peripherals on the board. Type a command with the wrong parameters and you can very quickly find the issue and resolve it. 

Share this post


Link to post
Share on other sites

@@t0mpr1c3 , here is a page that goes through the setup process for the kit: http://wiki.eluaproject.net/TILM3S

 

Documentation is here:  http://www.eluaproject.net/doc/v0.9/   Look under 'Reference Manual' -> 'Platform Modules' -> 'lm3s' -> 'disp'  for the commands pertaining to the OLED display. Use 1000000 for the frequency parameter.

Share this post


Link to post
Share on other sites

Attached is a build of eLua for the Tiva Launchpad.

 

In addition to the regular eLua build, this one should support PWM, both CAN interfaces, and quadrature encoder.

 

(Quadrature encoder module is lm3s.qei - documentation is a little hard to get at at the moment).

 

It is untested at the moment (don't have a Tiva launchpad to try it on).

 

If you try it and it works, please let me know what you tried.

If you try it and it doesn't, likewise (plus indicate symptoms/error messages/etc.) and I will see if can fix problem.

 

elua_lualong_ek-tm4c123.zip

Edit: Attached file updated 3 Mar. 2014 - few more tweaks to PWM. This version does not have the quadrature encoder module in it.

 

Have not been able to get PWM to work.

 

New version using Tivaware drivers.

elua_lualong_ek-tm4c123g.zip

 

Edit: Attached new version 28 Mar. 2014

Edit: Updated Tivaware version 1 May 2014.  (Should have solved clock bug, fixed some CAN problems)

 

Edit: Attached alternative to the tm4c123g version (try that one first, but if it gives gibberish on serial line, then try this one).

elua_lualong_ek-tm4c123g-uartclock.zip New version using Tivaware drivers, but with alternative serial port clock (in case version elua_lualong_ek-tm4c123g.zip does not work).

 

elua_lualong_ek-tm4c123.zip

elua_lualong_ek-tm4c123g-uartclock.zip

elua_lualong_ek-tm4c123g.zip

Share this post


Link to post
Share on other sites

Attached is a build of eLua for the Tiva Launchpad.

 

In addition to the regular eLua build, this one should support PWM, both CAN interfaces, and quadrature encoder.

 

(Quadrature encoder module is lm3s.qei - documentation is a little hard to get at at the moment).

 

It is untested at the moment (don't have a Tiva launchpad to try it on).

 

If you try it and it works, please let me know what you tried.

If you try it and it doesn't, likewise (plus indicate symptoms/error messages/etc.) and I will see if can fix problem.

@@igor, Mailed you for your POTM prize. Please reply.

 :)

Share this post


Link to post
Share on other sites

I downloaded the bin and installed it on my Tiva, and its talking to me.  However, 

> ledpin = pio.PF_1

> pio.pin.sethigh( ledpin )

Doesn't turn on a led.  

 

??

 

 

PS -- Thanks for your work.  

I used "screen /dev/cu.usbmodem0E200361 115200" on my Mac to talk to it.  

Share this post


Link to post
Share on other sites

I downloaded the bin and installed it on my Tiva, and its talking to me.  However, 

> ledpin = pio.PF_1

> pio.pin.sethigh( ledpin )

Doesn't turn on a led.  

 

??

 

 

PS -- Thanks for your work.  

I used "screen /dev/cu.usbmodem0E200361 115200" on my Mac to talk to it.  

 

Did you make ledpin an output (pio.pin.setdir) before writing to it?

ledpin = pio.PF_1
pio.pin.setdir( pio.OUTPUT, ledpin )
pio.pin.sethigh( ledpin )

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×