stm32f4 - timers issue in examples

classic Classic list List threaded Threaded
5 messages Options
Pito Pito
Reply | Threaded
Open this post in threaded view
|

stm32f4 - timers issue in examples

Hi, I'm new with elua - I've got the disco kit and trying to
understand the stuff..
I've created the environment and I can compile the elua (using
https://github.com/jsnyder/elua/tree/bikeNomad-master).
When running Zhanjun's ready hex file the demo's works, when running
compiled version from above branch I get errors on timers:
eLua# lua /rom/led.lua
Press CTRL+Z to exit Lua
Hello from eLua on STM32F4DSCY
Watch your LED blinking :)
Enjoy eLua !
Press any key to end this demo.

lua: /rom/led.lua:43: timer 500000 does not exist
stack traceback:
[C]: in function 'delay'
/rom/led.lua:43: in function 'cycle'
/rom/led.lua:59: in main chunk
[C]: ?
eLua# lua /rom/pwmled.lua
Press CTRL+Z to exit Lua
Control LED with PWM (fade up/down)
Press any key to exit
lua: /rom/pwmled.lua:35: timer 50000 does not exist
stack traceback:
[C]: in function 'delay'
/rom/pwmled.lua:35: in main chunk
[C]: ?
eLua# lua /rom/adcscope.lua

Is there any change in handling timers in the elua from jsnyder's
branch?
Thanks,
Pito


--
Jak se vyhnout nachlazení a dalším zdravotním potížím v nepříjemném
podzimním období? Čtěte speciál Zdraví na podzim na
http://web.volny.cz/data/click.php?id=1290



_______________________________________________
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: stm32f4 - timers issue in examples

Hi,

2011/11/10 pito <[hidden email]>:
> Hi, I'm new with elua - I've got the disco kit and trying to
> understand the stuff..

Welcome aboard

> I've created the environment and I can compile the elua (using
> https://github.com/jsnyder/elua/tree/bikeNomad-master).
> When running Zhanjun's ready hex file the demo's works, when running
> compiled version from above branch I get errors on timers:
> eLua# lua /rom/led.lua
> Press CTRL+Z to exit Lua
> Hello from eLua on STM32F4DSCY
> Watch your LED blinking :)
> Enjoy eLua !
> Press any key to end this demo.
>
> lua: /rom/led.lua:43: timer 500000 does not exist

500000 should be the delay parameter (in microseconds), not the Timer ID.
Maybe James was experimenting some other syntax.


> stack traceback:
> [C]: in function 'delay'
> /rom/led.lua:43: in function 'cycle'
> /rom/led.lua:59: in main chunk
> [C]: ?
> eLua# lua /rom/pwmled.lua
> Press CTRL+Z to exit Lua
> Control LED with PWM (fade up/down)
> Press any key to exit
> lua: /rom/pwmled.lua:35: timer 50000 does not exist
> stack traceback:
> [C]: in function 'delay'
> /rom/pwmled.lua:35: in main chunk
> [C]: ?
> eLua# lua /rom/adcscope.lua
>
> Is there any change in handling timers in the elua from jsnyder's
> branch?
> Thanks,
> Pito

Dado







>
>
> --
> Jak se vyhnout nachlazení a daląím zdravotním potíľím v nepříjemném
> podzimním období? Čtěte speciál Zdraví na podzim na
> http://web.volny.cz/data/click.php?id=1290
>
>
>
> _______________________________________________
> 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
Pito Pito
Reply | Threaded
Open this post in threaded view
|

Re: stm32f4 - timers issue in examples

..I can see he did changes in platform.c related to timers, so maybe
there is an issue. Let us wait :). Thnx.P.

----- PŮVODNÍ ZPRÁVA -----
Od: "Dado Sutter" <[hidden email]>
Komu: "eLua Users and Development List (www.eluaproject.net)"
<[hidden email]>
Předmět: Re: [eLua-dev] stm32f4 - timers issue in examples
Datum: 10.11.2011 - 11:43:33

> Hi,
>
> 2011/11/10 pito <[hidden email]>:
> > Hi, I'm new with elua - I've got the disco kit
> > and trying to
> > > understand the stuff..
>
> Welcome aboard
>
> > I've created the environment and I can compile
> > the elua (using
> > > https://github.com/jsnyder/elua/tree/bikeNomad-master).
> > > When running Zhanjun's ready hex file the demo's
> > works, when running
> > > compiled version from above branch I get errors
> > on timers:
> > > eLua# lua /rom/led.lua
> > Press CTRL+Z to exit Lua
> > Hello from eLua on STM32F4DSCY
> > Watch your LED blinking :)
> > Enjoy eLua !
> > Press any key to end this demo.
> >
> > lua: /rom/led.lua:43: timer 500000 does not
> > exist
> >
> 500000 should be the delay parameter (in
> microseconds), not the Timer ID.
> Maybe James was experimenting some other syntax.
>
>
> > stack traceback:
> > [C]: in function 'delay'
> > /rom/led.lua:43: in function 'cycle'
> > /rom/led.lua:59: in main chunk
> > [C]: ?
> > eLua# lua /rom/pwmled.lua
> > Press CTRL+Z to exit Lua
> > Control LED with PWM (fade up/down)
> > Press any key to exit
> > lua: /rom/pwmled.lua:35: timer 50000 does not
> > exist
> > > stack traceback:
> > [C]: in function 'delay'
> > /rom/pwmled.lua:35: in main chunk
> > [C]: ?
> > eLua# lua /rom/adcscope.lua
> >
> > Is there any change in handling timers in the
> > elua from jsnyder's
> > > branch?
> > Thanks,
> > Pito
>
> Dado
>
>
>
>
>
>
>
> >
> >
> > --
> > Jak se vyhnout nachlazení a daląím zdravotním
> > potíľím v nepříjemném
> > > podzimním období? Čtěte speciál Zdraví na podzim
> > na
> > > http://web.volny.cz/data/click.php?id=1290
> >
> >
> >
> > _______________________________________________
> > 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
>


--
Jak se vyhnout nachlazení a dalším zdravotním potížím v nepříjemném
podzimním období? Čtěte speciál Zdraví na podzim na
http://web.volny.cz/data/click.php?id=1290



_______________________________________________
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: stm32f4 - timers issue in examples

In reply to this post by Dado Sutter


2011/11/10 Dado Sutter <[hidden email]>
Hi,

2011/11/10 pito <[hidden email]>:
> Hi, I'm new with elua - I've got the disco kit and trying to
> understand the stuff..

Welcome aboard

> I've created the environment and I can compile the elua (using
> https://github.com/jsnyder/elua/tree/bikeNomad-master).
> When running Zhanjun's ready hex file the demo's works, when running
> compiled version from above branch I get errors on timers:
> eLua# lua /rom/led.lua
> Press CTRL+Z to exit Lua
> Hello from eLua on STM32F4DSCY
> Watch your LED blinking :)
> Enjoy eLua !
> Press any key to end this demo.
>
> lua: /rom/led.lua:43: timer 500000 does not exist

500000 should be the delay parameter (in microseconds), not the Timer ID.
Maybe James was experimenting some other syntax.

Nope, the timer API has changed when the system timer was merged into the master branch (search the list for more information). Now the timer ID is always the last (optional) argument. I forgot to modify the samples, of course :) 

Best,
Bogdan



> stack traceback:
> [C]: in function 'delay'
> /rom/led.lua:43: in function 'cycle'
> /rom/led.lua:59: in main chunk
> [C]: ?
> eLua# lua /rom/pwmled.lua
> Press CTRL+Z to exit Lua
> Control LED with PWM (fade up/down)
> Press any key to exit
> lua: /rom/pwmled.lua:35: timer 50000 does not exist
> stack traceback:
> [C]: in function 'delay'
> /rom/pwmled.lua:35: in main chunk
> [C]: ?
> eLua# lua /rom/adcscope.lua
>
> Is there any change in handling timers in the elua from jsnyder's
> branch?
> Thanks,
> Pito

Dado







>
>
> --
> Jak se vyhnout nachlazení a dal±ím zdravotním potíµím v nepříjemném
> podzimním období? Čtěte speciál Zdraví na podzim na
> http://web.volny.cz/data/click.php?id=1290
>
>
>
> _______________________________________________
> 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
Pito Pito
Reply | Threaded
Open this post in threaded view
|

Re: stm32f4 - timers issue in examples

>Now the timer ID is
> always the last (optional) argument. I forgot to
> modify the samples, of
> course :)
>
> Best,
> Bogdan
Bogdan, thanks! It works now :).
p.


--
Videokurzy MS Office zdarma! Portál VOLNÝ.cz přináší online výuková
videa, která vás rychle, názorně a zábavnou formou naučí ovládat
programy Excel, Word a PowerPoint. Seriál najdete na
http://web.volny.cz/data/click.php?id=1293


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