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

ARDUINO_SAMD_ZERO extra/different hardware SPI with SERCOM1 #652

DylanMeng opened this Issue Sep 14, 2018 · 1 comment


None yet
2 participants
Copy link

DylanMeng commented Sep 14, 2018

Hello, currently on Arduino zero the hardware SPI for FastLed is defined by digital pin 24 and 23
#define SPI_DATA 24
#define SPI_CLOCK 23

The problem is when you have other devices on the same SPI. The LED strip will react to any data due to missing chip select.

To get around this problem I am trying to create another hardware SPI on a different SERCOM (SERCOM1).

I successfully created another SPI on SERCOM1 (tested and fully working at 8Mhz)

SPIClass mySPI (&sercom1, 12, 13, 11, SPI_PAD_0_SCK_1, SERCOM_RX_PAD_3);
pinPeripheral(11, PIO_SERCOM); 
pinPeripheral(12, PIO_SERCOM); 
pinPeripheral(13, PIO_SERCOM);

But the problem is that I am not sure how to link this new hardware SPI to the Fasted library.

Any ideas on how I could do that?


This comment has been minimized.

Copy link

focalintent commented Sep 15, 2018

FastLED currently doesn't have any hardware SPI support for the D21 - so you can just tell it to use any pair of pins for clock/data and it will fall back to bitbang'd SPI.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.