Teensy 4.0 First Beta Test

Status
Not open for further replies.
Thanks for checking. Not sure why it's not working for me. Do I have to turn on verbose or something?

Thanks
Mike
 
Hello,
i have 4 Teensy 4 boards now. After installing Arduino IDE 1.8.9 and Teensyduino 1.47 beta 6 i connected Teensy 4 with Adafruit 1,8" Color TFT LCD display with MicroSD Card Breakout ( https://www.adafruit.com/product/358 ).
I am using following pins: MISO - pin12, SCK - pin13, MOSI - pin11, TFT_CS - pin10, Card_CS - pin4, D/C - pin9, Reset - pin8, VCC - 3,3V, Gnd - Gnd
But there were no success in using ST7735_t3 spiffbitmap : (with SD Card) : Initializing SD Card - failure -> Screen is white .... (without SD Card): Initializing SD Card - failure -> Screen is blach with message: Unable to access SD Card

Then i tried graphicstest: Text is ok, most graphics also, but in the end there were objects on the screen that were not right.
rotationtest: black screen

I cross checked 2 Displays with my Teensy 3.6 and they are ok.

Is there any hope that it would run in the full version?
 
@manitou - @defragster

Just did a test where I am using a T3.6 to generate a 40, 50 and 75Mhz using analogWriteFreq(8, xxx) to the T4 that generates a 50Mhz on its pin8. Measured values look good on the T4 and still not sure what the issue is going from T4 to T4. BTW I am using long wires going from the T3.6 to the T4 (240mm)

These are the results:
Code:
T3.6:
5000006 
5000005
5000006
5000005

T4.0
4000008 
3999998
4000009
3999997
4000002

With T3.6 sending 50Mhz to the the T4:
4999994 
4999994
4999995
4999994
4999994

with t3.6 sending 75Mhz
7499993 
7499992
7499992
7499991
7499992
7499993
 
@manitou - @defragster

Just did a test where I am using a T3.6 to generate a 40, 50 and 75Mhz using analogWriteFreq(8, xxx) to the T4 that generates a 50Mhz on its pin8. Measured values look good on the T4 and still not sure what the issue is going from T4 to T4. BTW I am using long wires going from the T3.6 to the T4 (240mm)
How do you get T3.6 to generate 75 mhz? max PWM is F_BUS/2 ?

? also your counts are short a digit ? 7499993 is about 7.5 MHz ?

I also re-ran frequency count tests with the Adafruit clock generator to pin 9 on my production T4 (male headers in breadboard). Frequencies are accurate to within measured frequency error of my T4 24MHz crystal (-10 ppm) and my generator 25MHz crystal (-31 ppm). I was using 7" jumpers, and measurements were good up to 66MHz.

I also updated my coremark power plot data post (plot is about the same) for tests on T4 (1062) at different CPU speeds.

Also successfully tested propshield plugged into female headers on T4.
 
Last edited:
@manitou

Ok I didn't notice that - did it at about 8am this morning. Anyway, not sure what the heck I did now. I just tried to repeat it with the T3.6 and couldn't. Losing my mind now.

When you re-ran the tests on the production T4 with the clock gen did you use the library or you stand alone sketch.
 
@manitou

Ok I didn't notice that - did it at about 8am this morning. Anyway, not sure what the heck I did now. I just tried to repeat it with the T3.6 and couldn't. Losing my mind now.

When you re-ran the tests on the production T4 with the clock gen did you use the library or you stand alone sketch.

I was using my standalone sketch. But the last time i tested your FreqCount lib, they behaved the same. (I don't have the generator wired up at the moment).
 
T4 and audio shield

With my breadboard T4, i tried using (long M-F jumpers 10") to hook up T4 to Rev C audio shield. I confirmed SPI/uSD was working on shield, and when I ran WavFilePlayer it says its playing, but i'm just getting high freq noise on the ear buds. I'm guessin' jumpers are way too long, though i could have messed up the jumpering -- that's a lot of jumpers (12)! (one can't use current audio shield with female headers on T4 because wiring would be wrong. awaiting T4 version of audio shield)
 
@manitou

Resetting up the clock gen with the production T4 as a retest. Have to remember with one of breakout boards to see the delta - then going to retry with @defragster's sketch. Etc.

BTW. Whats the max I can get out of the T3.6?
 
@manitou

Resetting up the clock gen with the production T4 as a retest. Have to remember with one of breakout boards to see the delta - then going to retry with @defragster's sketch. Etc.

BTW. Whats the max I can get out of the T3.6?

T3* max PWM (FTM) is F_BUS/2 -- so usually 30 MHz max. so me thinks your early morning tests were at 5MHz not 50MHz ;)
 
ArduCAM for T4

With an assist from @KurtE (Thanks Kurt) I managed to get ArduCAM working on the T3.x's (tested 3.2 and T3.6) and the T4 as well. I tested with the ArduCAM Mini 2MP and the ArduCAM Shield V2 (w/LCD on it). Both are streaming to the desktop and the shield now displays to the LCD as well. Posted here since this is still a WIP and code needs clean up. But if you want to give it a try the library is posted here: https://github.com/mjs513/WIP/tree/master/ArduCAM_t4

Hello mjs513:

Is this the model you tested with?

https://www.robotshop.com/en/arducam-mini-camera-module-shield-2-mp-ov2640-arduino.html

Can you share what libraries can be used to get a snapshot from the camera and do simple image processing?

Thanks in advance.
 
Hello mjs513:

Is this the model you tested with?

https://www.robotshop.com/en/arducam-mini-camera-module-shield-2-mp-ov2640-arduino.html

Can you share what libraries can be used to get a snapshot from the camera and do simple image processing?

Thanks in advance.

Yes that is one of them that I tested. With the min shield it streams to the UCTRONICS desktop app so you can capture images or video. I also tested with this one https://www.robotshop.com/en/arducam-lf-revc-camera-module-32-lcd-arduino.html. I have not tested the ability to save an image to an SD Card yet. Still a work in progress between other projects. But if you want to give it a try here is the library: https://github.com/mjs513/ArduCAM_t4
 
I've committed a fix for simultaneous I2S audio input & output.

https://github.com/PaulStoffregen/Audio/commit/bd5332f9d9a6c3095c0563dacafd086b37474443

Looks like input was working, and output was working, but not both at the same time. Now they both work if used together.

Hi Paul,

is the PWM audio output working in the Audio lib on the T4? I have a compilation error with the T4 but not with the T3.6?
I am not familiar with using PWM as for audio output. Is there a tutorial somewhere? What values for the RC circuit are typically used? Does it work at 22Khz sample rate too?
With latest SDK I could finally compile the Atari ST code with sound (small code option). I just need the output to work now ;-)

J-M
 
@manitou - @defragster
Sorry @defragster will do your pin to pin test next.

I did a plot of the Adafruit clock generator along with going from T42BR (pins 8 and 19 to gen freq) and T4 production (pin9) to read freq.
Capture.JPG

Its funny how the pin frequencies dip on even frequencies. Going from T4 to T4 seems to be good up about 50Mhz as well. But that is not what we are seeing with the Clock Generator.

EDIT: ADDED PIN TO PIN on Prod T4
Capture.JPG
 
Last edited:
@manitou - @defragster

Could there be a problem timers for pwm/analogwritefreq conflicting with the freq count timers?
 
Note pin 10 (and all quadtimer PWM pins) can't do 75mhz, see my post
https://forum.pjrc.com/threads/54711-Teensy-4-0-First-Beta-Test?p=212043&viewfull=1#post212043
the core PWM quadtimer driver should be extended to support 75mhz, since the timer can in fact produce 75mhz PWM (50% duty)

pins 8 and 23 are flexPWM and they can do 75mhz

To be honest - forgot about those two posts. Sorry. Now the reason for deltas between 30-50 Mhz (stuck at 37.5 Mhz) and between 60-65 Mhz? Know we talked about this when we working with your standalone. Does that still apply.
 
@KurtE - @defragster

Think I find the reason why UncannyEyes was causing USB crash on startup. Don't know why it would cause the lose of USB though. Have to do some hardware in the loop tests just to double check. Been making a lot of booboo's today. Oh, the change I made to make it not loose USB:
Changed these lines:
Code:
   static boolean  eyeInMotion      = false;
   static int16_t  eyeOldX = 512, eyeOldY = 512, eyeNewX = 512, eyeNewY = 512;
   static uint32_t eyeMoveStartTime = 0L;
  static  int32_t  eyeMoveDuration  = 0L;
to
Code:
   boolean  eyeInMotion      = false;
   int16_t  eyeOldX = 512, eyeOldY = 512, eyeNewX = 512, eyeNewY = 512;
   uint32_t eyeMoveStartTime = 0L;
   int32_t  eyeMoveDuration  = 0L;
 
To be honest - forgot about those two posts. Sorry. Now the reason for deltas between 30-50 Mhz (stuck at 37.5 Mhz) and between 60-65 Mhz? Know we talked about this when we working with your standalone. Does that still apply.

Yes. for T4 PWM, discrete PWM frequencies are 150mhz/2, 150/3, 150/4, 150/5 .... so 75mhz, 50mhz, 37.5 mhz, 30mhz, 25, 21.428,18.75 ....
 
Status
Not open for further replies.
Back
Top