EDIT: Ignore title of post. Solved the rebooting issue immediately after posting. It was a duplicate instance of tft that was being created in setup function.. edited it out of code below. Fine if an admin wants to delete this thread.
Here is the real problem:
I am working on changing a product over from T3.2 to T4.1.
I am having problems with garbage characters displaying on RA8875 display(buydisplay) due to what seems like noise on the SPI lines or some other weird noise problem.
Worked fine on T3.2.Shipped hundreds of units.
Using same board layout, I've changed to T4.1. I can post pics of layout if anyone thinks its relevant. I also have another design based on T3.5 that has worked very well also.
Display doesn't work very well when running T4.1 at 600Mhz. Displays mostly garbage.
Can really only get it to work well with 4.1 running at 150Mhz and taking the SPI speed down to 8MHz for display. At those speeds, it still periodically display garbage. I've tried down to 4Mhz on SPI with no improvement.
Shouldn't SPI to display work well at any Teensy Speed or does additional noise from the processor cause the problem.
The Teensy and its PCB are mounted very closely over the top of RA8875 chip. Could this be causing noise to enter RA8875 or would it mostly be an issue with SPI lines.
This is running on a PCB that has Teensy soldered in place and the display connected by its headers. No breadboards or wires, etc. Tried on about (3) t4.1's so far and multiple displays to rule that out.
Running TeensyDuino 1.56, Arduino 1.8.19
code:
Here is the real problem:
I am working on changing a product over from T3.2 to T4.1.
I am having problems with garbage characters displaying on RA8875 display(buydisplay) due to what seems like noise on the SPI lines or some other weird noise problem.
Worked fine on T3.2.Shipped hundreds of units.
Using same board layout, I've changed to T4.1. I can post pics of layout if anyone thinks its relevant. I also have another design based on T3.5 that has worked very well also.
Display doesn't work very well when running T4.1 at 600Mhz. Displays mostly garbage.
Can really only get it to work well with 4.1 running at 150Mhz and taking the SPI speed down to 8MHz for display. At those speeds, it still periodically display garbage. I've tried down to 4Mhz on SPI with no improvement.
Shouldn't SPI to display work well at any Teensy Speed or does additional noise from the processor cause the problem.
The Teensy and its PCB are mounted very closely over the top of RA8875 chip. Could this be causing noise to enter RA8875 or would it mostly be an issue with SPI lines.
This is running on a PCB that has Teensy soldered in place and the display connected by its headers. No breadboards or wires, etc. Tried on about (3) t4.1's so far and multiple displays to rule that out.
Running TeensyDuino 1.56, Arduino 1.8.19
code:
Code:
// Test program for T4.1/RA8875 Debugging
#include <SPI.h>
#include <RA8875_w_Touch_T4.h> //Same library as latest T4 version that ships with TeensyDuino. Just renamed.
#define RA8875_CS 10 //SPI Chip Select
#define RA8875_RESET 255 //255 Disables reset
#define RA8875_INT 16 //Touch Int
int count = 0;
RA8875 tft = RA8875(RA8875_CS, RA8875_RESET, 11, 13, 12);
long unsigned debug_start = 0;
void setup()
{
debug_start = millis();
Serial.begin(38400);
delay(1000);
Serial.println(millis() - debug_start);
Serial.println("Setup Starting");
pinMode(PIN_A9, INPUT); // Added in attempt to fix T4.1 Analog Nonlinearity
analogReadRes(12); // T4.1: set ADC resolution to this many bits (probably not needed?)
analogReadAveraging(32);
delay(100);
tft.begin(RA8875_800x480);
delay(500);
tft.fillWindow(RA8875_WHITE);
tft.setFontScale(0);
tft.setCursor(640, 450);
tft.setTextColor(RA8875_BLACK, RA8875_WHITE);
tft.print("Testing...");
Serial.println("Setup Complete");
Serial.println(millis() - debug_start);
for (int i = 0; i < 4; i++) {
tft.setCursor(400, 200); tft.print(count); delay(200);
count += 1;
}
Serial.println(millis() - debug_start);
}
void loop() {
tft.setCursor(400, 200);
tft.print(count);
delay(50);
count += 1;
}
Last edited: