Teensy 4.0 First Beta Test

Status
Not open for further replies.
this is CAN2.0 legacy on CAN3. FD not implemented yet, everything you see in stream is CAN2.0 only atm.
This validates the hardware is working and connected properly, Mike’s SDK does T4 to T4 in FD mode however they don’t seem to talk to the mcp2517fd, probably bad SDK timings or something and since both t4’s run the same sdk it’s a given it should work..

Yes - good to see that CAN2.0 legacy from T4 to T4 on CANFD bus is working across the POGO pins and hardware!

Note I have the 110 OHM resistance on the PJRC board and clipped one end - so nothing - on the other DIY breakout end right now.
 
Instead of 1000 ms in the loop() test for sending _ made one 10 ms and the other 3 ms and TyComm was okay with that … Until I did an EDGE browser refresh - then oddly it took a LONG time to draw the web page and both TyComm's were frozen.

So of course I restarted both T4's now at 3 ms sending wait and both are running at that speed as I type this … they'll probably continue at least until I submit this post.

Edge getting bogged down with too much open has slowed machine and USB Serial down before - odd IF it resutled in Windows affecting USB in a way to halt both Teensy's? Hard to repro. TyComm's are VERY busy each printing 666 full lines per second - but still working now after 5 minutes or so ...

BTW: It seems MSFT is giving up on their new EDGE browser engine and going to move to the g00gle chr0me engine … sad - but it may work - except chr0me is part of the infection I've seen most on computers … at least there was a batch of them - maybe they fixed the hole.

Edit: Submit did not halt the TyComm's - neither did a page refresh before this edit
 
Chrome is good for exposure to viruses and deep discharging your portable's batteries, I'll stick to waterfox :)

Bummer - not just my experience with Chrome …

So the 3 ms loop() sending ran for some good time - both were stalled when I got back - I have a blink toggle in that - both lights were stuck on - so not cycling. I need to get back to my debug_tt as one thing it showed was USB and interrupts were working even when loop() was stalled … if that were the case here it might help break in and see what is stalled …

I just set this from 1 to 5 Million? :: Can1.setBaudRate(5000000);

It is working and seems to be doing something as both ends had to change. OF course that wouldn't work on real CAN2.0 hardware ...

Also dropped new message to :: if ( millis() - sending >= 1 ) {

Swapped the delay(1); for delayMicroseconds( 500 ); in there - and to reduce printing I put this in canSniff :: if ( ccnt%1000 ) return;

And had to move the BLINK down there too as ~1000 toggle/sec too fast to see.

So it seems to be nicely stable using the CANFD/CAN3 port in this CAN2.0 mode - even at higher speed. So hopefully anything working here will work as well on the other CAN1 and CAN2 ports.
 
@defragster - @tonton81

Morning Tim/Tony. Sorry your guys are up all night - couldn't stay awake anymore. Glad you got the T4's working in CAN2.0 mode. As for going from CAN3 to can1/can2 between the 2 boards, it works just the same, that both Tony and I tested. Now have to figure out why you can't get CANFD SDK examples working.
 
@defragster
Just for the fun of it I ran a test with T4-T4-T3.6 with the T4's in legacy mode on CAN3 going to CAN0 on the T3.6. The sketches ran without a problem:
Capture.JPG
 
@mjs513 - Sounds like you are making some progress with the CAN stuff! Maybe sometime I will pull the two units I purchased out and try them out...

Right now playing with a T4 breakout board to play with. Sort of part way between several of my other boards I played with. Same size as ILI9341 display board, has connector for it, plus USB, plus breakout for all pins (except SD so far). Added Bioloid DXL circuit, Neopixel, RFM95..., Pololu 2ish amp 5v DC/DC converter...

Now trying to decide if I should try adding some simple VIN/VUSB power switching? Suggestions? 1 or 2 Diodes?
 
@KurtE

Guess your are getting over the distractions :)

Now trying to decide if I should try adding some simple VIN/VUSB power switching? Suggestions? 1 or 2 Diodes?
I got around it by using a switch - never could get the diode direction right but I think I saw people using two -- know there were a bunch of posts around here somewhere.

As for power, I used the same circuit as the Arduino Mega board to provide 5v :)
 
Re: WavFilePlayer

There has been a problem with WavFilePlayer on T3.6 with BUILTIN_SDCARD, see https://forum.pjrc.com/threads/56239-Simple-WavFilePlayer-not-working

I decided to test on T4B2. T4B2 WavFilePlayer example "works" from audio adapter uSD (SPI) (I don't have needed SMD resistor for codec, so i get noise through ear buds, but it appears WAV files are playing). If I use BUILTIN_SDCARD, i get no audio and serial monitor never says it's "playing". Example listfiles and other SD IO seems to work with BUILTIN_SDCARD (1.8.8/1.47-beta2)

Can others confirm ?
 
Last edited:
On the T4B2m if I try to use BUILTIN_SDCARD I get noting except a message that its unable to access the SDCARD. If I switch it so CD = 10 it reads the card but nothing plays ? which is kinda of strange because I think before the last teensyduino update it was working - because I tested it. The files are good before you ask before I tested the playback on the PC.

Strange?
 
On the T4B2m if I try to use BUILTIN_SDCARD I get noting except a message that its unable to access the SDCARD.

Are you using the breakout board with 8 tiny pogo pins? Maybe try re-seating the T4. Run the test program from msg #2443 and use multimeter in frequency count mode, or another Teensy running FreqMeasure lib, to check that all 6 of the SD card signal pins really do have different frequencies.

I started building the next (and last) round of breakout board which will use the FFC (flat flex cable) connectors and a short cable between the boards, rather than those 8 tiny pogo pins. Hope to send out the first round on Wednesday.
 
Twin T4B2's CANFD as Legacy Can2 transfer running 12 hours p#2932 no signs of trouble. Each blinking 1/1000 CAN messages on bus at 5 MB/s messages printing each 500 ms - meaning canSniff getting 2,000 messages per second.

Going to shut that down as I got new HDD to try USBHost writing.
 
@PaulStoffregen
Based on your comments I am assuming that the BUILTIN_SDCARD is the card on the Breakout board? I also tested it with the audio shield SDCARD and nothing unfortunately never solder up a sdcard reader on the breakout with the added resistor.

Funny thing is I did a quick test of reading the files using listfiles from the SD library and it didn't work on the card on the breakout board but did work on the audio shield reader. I then ran the uSDFS test sketch from the uSDFS library and was able to read the contents of the SD Card without a problem. Reason I did it this way is because I don't have a multimeter with frequency count mode :( can you recommend an inexpensive one.

Going to do some more tests to see if I can track down why its not playing from the SD card on the Audio Shield which is seeing the files and listing but not playing. Have to go and breakout the lawnmower before my wife yells at me again to get it :)
 
@mjs513 - yes on T4B2's PJRC breakout - using BUILTIN_SDCARD routes to the POGO pinned SD socket, just like it routes to T_3.6/3.5 onboard SD bus pins.

I had BUILTIN work and IIRC had the Audio shield SD work as well - have to check sketch not sure if #13/#14 PCB routing changed default setting for where 13 hits 14?

I got a cheapo HYELEC MS8233D that worked for Hz testing the SD pins - on amazon it looks like this 'Crenova MS8233D' :: Crenova-Auto-Ranging-Multimeter-Measuring-Backlight - $20 and I see a $2 coupon. It is auto ranging SLOW and the Hz measure is limited - but worked for this test.
 
.

Going to do some more tests to see if I can track down why its not playing from the SD card on the Audio Shield which is seeing the files and listing but not playing. Have to go and breakout the lawnmower before my wife yells at me again to get it :)

T4 SPI pins are 10-13, so WavFilePlayer on audio shield uSD needs to define CS as 10 and not remap any other SPI pins.
 
@PaulStoffregen
As a followup to my post #2941. First problem was I had a bad audio shield - must have done something to it with all the abuse I gave it. I put on the second audio shield that you sent with the T4B2 boards and reran my wave player sketch with the SDCARD on the audio shield and it WORKED and played the different files.

Second test I put it the card on the SD reader on the T4B2 board (no resistor) and still got a message unable to read disk and just noise coming out of the speaker. Tested it with specifying the pins for MISO, MOSI, CLOCK and CS, then tested it with only specifying BUILTIN_SDCARD and got the same error message.

@defragster thanks for reference multimeter. Going to order one along with some SDcard sockets
 
Hi All

I know its in here somewhere but anybody know the part number for the micro SD socket on the Breakout board?
 
T4 SPI pins are 10-13, so WavFilePlayer on audio shield uSD needs to define CS as 10 and not remap any other SPI pins.

@manitou - think our posts crossed, a big part of the problem was my audio shield - somehow I managed to break it. Put a new one on then it started working with the Card on the audio shield but couldn't seem to get to read the card on the card on the breakout board. Well - I shouldn't say that, exactly, it would read the card but it would take forever to read unless I specified the builtin and then would get the error message
 
@PaulStoffregen

Thanks for the reference part - if I can ask another question: did you make that tiny pin holder for the SD card or did it come that way?

Anyway back to the BUILTIN_SDCARD and SD lib.

Can't figure out why the waveplayer sketch I use does not work with the SDCard on the breakout. When I specify BUILTIN_SDCARD it just hangs the sketch. By this is mean it just prints:
Code:
Initializing SD CARD
Unable to access the SD card
I will get the same message if I specify pins fully define with SPI.setXXX for the SD on the breakout.

Test 2 with the waveplayer sketch was to specify the pins for the SDcard on the audio shield. That did work and went through the files on card.

Test 3. Meanwhile if I run the listfiles.ino sketch in the SD library with just specifying the BUILTIN_SDCARD for chip select it will print out the directory and files in the blink of an eye.

Hope this makes explanation makes sense
 
Are you asking about the 3-4 layers & 2 screws of white plastic which hold the 8 tiny pogo pins in place? I did laser cut those plastic parts.
Had a feeling - you are one amazing guy Paul. Really not sure how you find the time to do everything that you do. :)
 
Status
Not open for further replies.
Back
Top