Skip to content

Commit

Permalink
Don't use onboard pixel
Browse files Browse the repository at this point in the history
  • Loading branch information
rbergen committed May 19, 2024
1 parent b1fafa1 commit e7ffc49
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions include/globals.h
Original file line number Diff line number Diff line change
Expand Up @@ -1327,7 +1327,7 @@ extern RemoteDebug Debug; // Let everyone in the project know about it
#elif ELECROW

// Implies ElecrowScreen

#elif AMOLED_S3

// Implicitly uses LilyGoScreen3
Expand Down Expand Up @@ -1358,9 +1358,10 @@ extern RemoteDebug Debug; // Let everyone in the project know about it


#ifdef ESP32FEATHERTFT
#define ONBOARD_PIXEL_ORDER EOrder::RGB
#define ONBOARD_PIXEL_POWER 34
#define ONBOARD_PIXEL_DATA 33
// Commented out because FastLED crashes if the onboard pixel is used
// #define ONBOARD_PIXEL_ORDER EOrder::RGB
// #define ONBOARD_PIXEL_POWER 34
// #define ONBOARD_PIXEL_DATA 33
#endif

#ifndef USE_OLED
Expand Down

1 comment on commit e7ffc49

@robertlipe
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was just a few weeks shy of strapping #580 into a debugger to repro and fix (there's a related issue that @GameTec-live filed in fastled itself (maybe FastLED/FastLED#1587 ?), but this is a super find. I don't know if I wasn't listening to the actual key to the repro case, but if this is indeed the same problem, thank you for finding it as I didn't at all know that "Feather" was the key variable here.

This says the onboard pixels are on GPIO 34 and GPIO 33. If https://api.riot-os.org/group__cpu__esp32__esp32s3.html is to be believed (I don't feel like pulling the official reference manual right now) then GPIO33 and 34 are used for Flash and PSRAM for any device using Octal mode which includes most of the larger -S3's.

Trying to blink an LED that instead trounces a pin of the memory you're using seems unlikely to be a good thing.

If this is indeed the key, perhaps we should add a test that those pins are NEVER defined by anything in globals.h for s3. I can help with that if necessary.

Then again, perhaps globals.h. shouldn't set these at al, but should rely on a correct board file being used and perhaps use LED_BUILTIN (or something similar?) from espressif/arduino-esp32#6808 or something.

Please sign in to comment.