Adafruit_ILI9341 icon indicating copy to clipboard operation
Adafruit_ILI9341 copied to clipboard

Compatibility problems with AVR Dx series microcontrollers.

Open Guy1000 opened this issue 1 year ago • 0 comments

Thank you for opening an issue on an Adafruit Arduino library repository. To improve the speed of resolution please review the following guidelines and common troubleshooting steps below before creating the issue:

  • Do not use GitHub issues for troubleshooting projects and issues. Instead use the forums at http://forums.adafruit.com to ask questions and troubleshoot why something isn't working as expected. In many cases the problem is a common issue that you will more quickly receive help from the forum community. GitHub issues are meant for known defects in the code. If you don't know if there is a defect in the code then start with troubleshooting on the forum first.

  • If following a tutorial or guide be sure you didn't miss a step. Carefully check all of the steps and commands to run have been followed. Consult the forum if you're unsure or have questions about steps in a guide/tutorial.

  • For Arduino projects check these very common issues to ensure they don't apply:

    • For uploading sketches or communicating with the board make sure you're using a USB data cable and not a USB charge-only cable. It is sometimes very hard to tell the difference between a data and charge cable! Try using the cable with other devices or swapping to another cable to confirm it is not the problem.

    • Be sure you are supplying adequate power to the board. Check the specs of your board and plug in an external power supply. In many cases just plugging a board into your computer is not enough to power it and other peripherals.

    • Double check all soldering joints and connections. Flakey connections cause many mysterious problems. See the guide to excellent soldering for examples of good solder joints.

    • Ensure you are using an official Arduino or Adafruit board. We can't guarantee a clone board will have the same functionality and work as expected with this code and don't support them.

If you're sure this issue is a defect in the code and checked the steps above please fill in the following fields to provide enough troubleshooting information. You may delete the guideline and text above to just leave the following details:

  • Arduino board: AVR128DB28 with DxCore

  • Arduino IDE version (found in Arduino -> About Arduino menu): 1.8.13

  • List the steps to reproduce the problem below (if possible attach a sketch or copy the sketch code in too): **Using SPI1 mapped to portc to use the internal level shifter it doesn't work but works when using spi0 mapped to porta. Everything compiles just fine but when the tft.begin() function is called the microcontroller freezes and becomes unresponsive. Other libraries appear to all operate properly with the spi interface on portc except for this one.

#include <SPI.h> #include "Adafruit_GFX.h" #include "Adafruit_ILI9341.h"

#define TFT_DC PIN_PA3 #define TFT_CS PIN_PA7 //#define TFT_RST PIN_PF1 //tied high with resistor #define TFT_MOSI PIN_PC0 #define TFT_CLK PIN_PC2 #define TFT_MISO PIN_PC1

Adafruit_ILI9341 tft = Adafruit_ILI9341(TFT_CS, TFT_DC);

void setup() { SPI.swap(SPI1_SWAP0); //Swaps to the portc MVIO to use internal level shifters SPI.begin(); Serial.begin(9600); Serial.println("STARTED"); //Before function is called the print is successful tft.begin(); //gets stuck somewhere in here Serial.println("SUCCESSFUL"); //This print never occurs }

void loop{ //do nothing

}**

Guy1000 avatar Feb 14 '23 19:02 Guy1000