Forum Rule: Always post complete source code & details to reproduce any issue!
Page 118 of 175 FirstFirst ... 18 68 108 116 117 118 119 120 128 168 ... LastLast
Results 2,926 to 2,950 of 4361

Thread: Teensy 4.0 First Beta Test

  1. #2926
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    10,075
    Quote Originally Posted by tonton81 View Post
    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.

  2. #2927
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    10,075
    Quote Originally Posted by tonton81 View Post
    maybe because serial4 is not initialized?
    Correct - no setup() init and I have the CORES DEBUG init removed as well. But lack of debug print shouldn't kill the functionality.

  3. #2928
    Senior Member
    Join Date
    Dec 2016
    Location
    Montreal, Canada
    Posts
    3,133
    Indeed, how about not calling mailboxStatus? Does it lock up? Thats the only function that prints to Serial4

  4. #2929
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    10,075
    Quote Originally Posted by tonton81 View Post
    Indeed, how about not calling mailboxStatus? Does it lock up? Thats the only function that prints to Serial4
    No lockup - It works if I remove .mailboxStatus() call - and then the #define is not needed.

  5. #2930
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    10,075
    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

  6. #2931
    Senior Member
    Join Date
    Dec 2016
    Location
    Montreal, Canada
    Posts
    3,133
    Chrome is good for exposure to viruses and deep discharging your portable's batteries, I'll stick to waterfox

  7. #2932
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    10,075
    Quote Originally Posted by tonton81 View Post
    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.

  8. #2933
    Senior Member+ mjs513's Avatar
    Join Date
    Jul 2014
    Location
    New York
    Posts
    4,287
    @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.

  9. #2934
    Senior Member+ mjs513's Avatar
    Join Date
    Jul 2014
    Location
    New York
    Posts
    4,287
    @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:
    Click image for larger version. 

Name:	Capture.JPG 
Views:	24 
Size:	180.6 KB 
ID:	16672

  10. #2935
    Senior Member+ KurtE's Avatar
    Join Date
    Jan 2014
    Posts
    5,703
    @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?

  11. #2936
    Senior Member+ mjs513's Avatar
    Join Date
    Jul 2014
    Location
    New York
    Posts
    4,287
    @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

  12. #2937
    Senior Member+ manitou's Avatar
    Join Date
    Jan 2013
    Posts
    2,236
    Re: WavFilePlayer

    There has been a problem with WavFilePlayer on T3.6 with BUILTIN_SDCARD, see https://forum.pjrc.com/threads/56239...er-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 by manitou; 05-21-2019 at 08:11 PM.

  13. #2938
    Senior Member+ mjs513's Avatar
    Join Date
    Jul 2014
    Location
    New York
    Posts
    4,287
    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?

  14. #2939
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    20,778
    Quote Originally Posted by mjs513 View Post
    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.

  15. #2940
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    10,075
    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.

  16. #2941
    Senior Member+ mjs513's Avatar
    Join Date
    Jul 2014
    Location
    New York
    Posts
    4,287
    @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

  17. #2942
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    10,075
    @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.

  18. #2943
    Senior Member+ manitou's Avatar
    Join Date
    Jan 2013
    Posts
    2,236
    Quote Originally Posted by mjs513 View Post
    .

    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.

  19. #2944
    Senior Member+ mjs513's Avatar
    Join Date
    Jul 2014
    Location
    New York
    Posts
    4,287
    @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

  20. #2945
    Senior Member+ mjs513's Avatar
    Join Date
    Jul 2014
    Location
    New York
    Posts
    4,287
    Hi All

    I know its in here somewhere but anybody know the part number for the micro SD socket on the Breakout board?

  21. #2946
    Senior Member+ mjs513's Avatar
    Join Date
    Jul 2014
    Location
    New York
    Posts
    4,287
    Quote Originally Posted by manitou View Post
    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

  22. #2947
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    20,778
    Quote Originally Posted by mjs513 View Post
    part number for the micro SD socket on the Breakout board?
    Digikey HR1941CT-ND

  23. #2948
    Senior Member+ mjs513's Avatar
    Join Date
    Jul 2014
    Location
    New York
    Posts
    4,287
    @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

  24. #2949
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    20,778
    Quote Originally Posted by mjs513 View Post
    did you make that tiny pin holder for the SD card or did it come that way?
    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.

  25. #2950
    Senior Member+ mjs513's Avatar
    Join Date
    Jul 2014
    Location
    New York
    Posts
    4,287
    Quote Originally Posted by PaulStoffregen View Post
    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •