Hi
I'm trying to test AVR32 Lua interrupts in trunk and don't see what
I'm doing wrong.
Using (adapted from the sample code at
http://www.eluaproject.net/doc/v0.8/en_inthandlers.html):function tmr_handler( resnum )
print( string.format( "Timer interrupt for id %d", resnum ) )
end
cpu.set_int_handler( cpu.INT_TMR_MATCH, tmr_handler ) -- returns nil
tmr.set_match_int(500000, tmr.INT_CYCLIC, 0 ) --once every half second
cpu.sei( cpu.INT_TMR_MATCH, 0)
it sits there for about 15 seconds, then starts going
ERROR in elua_int_add: buffer overflow, interrupt not queued
ERROR in elua_int_add: buffer overflow, interrupt not queued
ERROR in elua_int_add: buffer overflow, interrupt not queued
giving one message every half second.
Likewise, for GPIO interrupts:
button = pio.PX_16
function gpio_negedge_handler( resnum )
local port, pin = pio.decode( resnum )
print( string.format( "GPIO NEGEDGE interrupt on port %d, pin %d",
port, pin ) )
end
cpu.set_int_handler( cpu.INT_GPIO_NEGEDGE, gpio_negedge_handler )
cpu.sei( cpu.INT_GPIO_NEGEDGE, button )
nothng happens until the 26th button press, at which point I get
ERROR in elua_int_add: buffer overflow, interrupt not queued
each time I press the button
Does anyone know what I am missing here?
M
_______________________________________________
eLua-dev mailing list
[hidden email]
https://lists.berlios.de/mailman/listinfo/elua-dev