Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TLC59711 driver not working with CircuitPython 7.1 on small int boards #21

Open
tomeskenazi opened this issue Jan 3, 2022 · 1 comment

Comments

@tomeskenazi
Copy link

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.

@s-light
Copy link
Contributor

s-light commented Jan 28, 2022

for point 1: wold it help to just split this into multiple files? i could do this easily..

for point 2: i don't remember out of my head - i think yes it uses 32-bit integers for storing things and moving around..

what is the change between 3.1 and 7.1 that leads to not working anymore?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants