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

Versions 1.2.0+ breaks onboard DotStar on Trinket M0 #52

Open
nstansby opened this issue Nov 1, 2022 · 2 comments
Open

Versions 1.2.0+ breaks onboard DotStar on Trinket M0 #52

nstansby opened this issue Nov 1, 2022 · 2 comments

Comments

@nstansby
Copy link

nstansby commented Nov 1, 2022

  • Arduino board: Adafruit Trinket M0

  • Arduino IDE version (found in Arduino -> About Arduino menu): 2.0.1 (Also saw the issue on the legacy IDE)

Please note this seems to be slightly intermittent; see notes at end.

  1. Install 1.1.5 version of Adafruit DotStar
  2. The sketch below (which simply flashes the onboard DotStar in blue) will compile, upload, and work fine.
  3. Install 1.2.0 or 1.2.1 version of DotStar
  4. The same sketch will compile and upload, but after the device reboots it crashes and you get the "USB device not recognized". Resetting or disconnecting/reconnecting the Trinket makes no difference; you have to do a double-reset to get to the bootloader in order to get the device responding again.
  5. Reinstall 1.1.5 and the sketch works again.
#include <Adafruit_DotStar.h>

Adafruit_DotStar strip(1, 7, 8, DOTSTAR_BRG);

void setup() {
  strip.begin();
  strip.setBrightness(25);
  strip.show();
}

void loop() {
  strip.setPixelColor(0, 0, 0, 255);
  strip.show();
  delay(500);
  strip.setPixelColor(0, 0, 0, 0);
  strip.show();
  delay(500);
}

I have 4 Trinket M0s, and the problem can be reproduced reliably on 3 of them. Of those three, two have the 2.0.0 UF2 bootloader, and I upgraded one of them to the latest 3.14.0 to see if that made a difference (it didn't).

On the fourth board, which also has the 2.0.0 UF2 bootloader, the problem is intermittent; immediately after upload it usually works, but resetting the board with the reset button or a power cycle brings it to the same "USB device not recognized".

All four boards work reliably with the 1.1.5 version of the library.

I also have a couple of ItsyBitsy M4s with onboard DotStars; I tried both of them (with the appropriate pin numbers) and didn't see the problem there.

@caternuson
Copy link
Contributor

caternuson commented Apr 19, 2023

Not sure how that example sketch ever worked. On the Itsy M0 the onboard DotStar pins are 40 (clock) and 41 (data).

https://learn.adafruit.com/introducing-itsy-bitsy-m0/pinouts#spi-flash-and-dotstar-2989068

EDIT - oops, nevermind. Issue is with a Trinket M0. sorry, working several different board/issues at once right now.

@caternuson
Copy link
Contributor

Just tested this with a Trinket M0 and it works. So can't recreate the issue described.

Make sure all other Arduino libraries and Board Support Packages are up to date as well.

This behavior:

The same sketch will compile and upload, but after the device reboots it crashes and you get the "USB device not recognized". Resetting or disconnecting/reconnecting the Trinket makes no difference; you have to do a double-reset to get to the bootloader in order to get the device responding again.

sounds like something more lower level is not working as expected.

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