Skip to content

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

@tomeskenazi

Description

@tomeskenazi

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions