[En-Nut-Discussion] TWI and Lua problem
Andre Riesberg
andre at riesberg-net.de
Sun Apr 10 09:32:11 CEST 2011
Hello all,
I use NutOS 4.9.10 on a board like EIR with a SAM7S CPU. I use a big
display board with 72 LED using four LTC3220 LED driver and a PCA9546A
I2C multiplexer. Everything works fine when I access the devices from c
code. If I try to access the device from a Lua script (I had written a
Lua function wrapper for TwMasterTransact) I run into problems. After
some bytes (5 to 15) I see a too short clock pulse. Normally the clock
pulse is 100µs long, both high and low part. The too short low pulse is
only 0.5µs long. This equivalent to a frequency of 1MHz and much too
fast for the I2C devices I use.
If I call the Lua wrapper function directly from c, It works fine. It
fails only together with Lua.
I have higher the stack space of the Lua thread. Same result.
I check heap memory with NUTMEM_GUARD and NUTDEVICE_HEAP, everything is ok.
Nobody change the port pins (SDA, SCL).
Any help is welcome!
Greetings
Andre
More information about the En-Nut-Discussion
mailing list