adafruit / adafruit/Adafruit_CircuitPython_TLC59711
TLC59711 driver not working with CircuitPython 7.1 on small int boards
- Dominant language
- Python
- Stars
- 6
- Forks
- 14
- PR merge metrics
- No merged PRs in 30d
Description
The TLC59711 library example "tlc59711_simpletest.py" fails to run on Trinket M0 with CircuitPython 7.1.
This issue has been discussed on the Adafruit forum: https://forums.adafruit.com/viewtopic.php?f=60&t=186817&p=905169#p905169
2 issues have been identified:
1) Memory Allocation error
It seems the library is too big to be loaded in memory on the Trinket M0.
This could be fixed by shortening the library (e.g. removing the TLC59711AutoShow class if not used) and recompiling the mpy.
2) Small Int Overflow
An OverflowError is thrown by the TLC59711 class constructor.
It seems the driver assumes it can use 32-bit integers as the following trace suggests:
Traceback (most recent call last):
File "main.py", line 23, in
File "adafruit_tlc59711.py", line 306, in __init__
File "adafruit_tlc59711.py", line 315, in _init_buffer
File "adafruit_tlc59711.py", line 438, in _chip_set_WriteCommand
File "adafruit_tlc59711.py", line 327, in set_chipheader_bits_in_buffer
OverflowError: small int overflow
The library was working fine with CircuitPython 3.1.1, version shipped with the Trinket M0.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with examples/tlc59711_simpletest.py and the traced functions in adafruit_tlc59711.py: __init__, _init_buffer, _chip_set_WriteCommand, and set_chipheader_bits_in_buffer. Reproduce the example on a Trinket M0 with CircuitPython 7.1 and compare the memory-allocation and small-int overflow failures. Done means the example loads and runs without either error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- embedded-iot
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100