-
-
Notifications
You must be signed in to change notification settings - Fork 488
Description
Describe the problem
I have code that has been working for a long time. It uses hardware SPI to communicate with a couple devices. After updating from Arduino IDE 2.0.4 to Arduino IDE 2.1.0, hardware SPI no longer works.
Details. I am using a SparkFun SAMD21 Mini Breakout. I have a generic ILI9341 display connected, similar to this. I am using the Adafruit_ILI9341 library. I am also using an Adafruit Micro SD SPI breakout board. All this worked fine with Arduino IDE 2.0.4. Change to Arduino IDE 2.1.0 and hardware SPI no longer works. I have found that if I use the constructor for the display that uses software SPI, then everything works again. No changes to wiring necessary, just enumerate all the pins and let the library use software SPI. Unfortunately, I have not found a similar fix for the SD card.
I tested by downloading the old 2.0.4 version and running it. With all the same updated libraries and same updated board support packages in place, the 2.0.4 version creates code such that software SPI works. So it seems the problem is with the Arduino IDE 2.1.0 update.
To reproduce
#define TFT_CS 10
#define TFT_DC 6
#define TFT_RST 7
Adafruit_ILI9341 tft = Adafruit_ILI9341(TFT_CS, TFT_DC, TFT_RST);`
Then try to use display.
Expected behavior
Expect it to work, as it did in 2.0.4. But in 2.1.0 it no longer works.
Arduino IDE version
2.1.0
Operating system
macOS
Operating system version
Ventura 13.4
Additional context
Per the issue checklist, I just downloaded and tried Arduino IDE "nightly-20230620". With this, Hardware SPI is working again for both the display and the SD card. So I guess this is a report of a bug in the current 2.1.0 release that already has a pending fix for the subsequent release. I did not find any issue reports related to this. I'll submit this report for documentation, and hopefully so the problem does not re-appear before the next release.
Issue checklist
- I searched for previous reports in the issue tracker
- I verified the problem still occurs when using the latest nightly build
- My report contains all necessary details