Forum Rule: Always post complete source code & details to reproduce any issue!
Page 98 of 137 FirstFirst ... 48 88 96 97 98 99 100 108 ... LastLast
Results 2,426 to 2,450 of 3413

Thread: Teensy 4.0 First Beta Test

  1. #2426
    Senior Member+
    Join Date
    Jul 2014
    Location
    New York
    Posts
    3,347
    @KurtE

    Did you ever test the display on SPI1?

  2. #2427
    Senior Member+
    Join Date
    Jul 2014
    Location
    New York
    Posts
    3,347
    ANALOG.C

    Think this needs to be updated for addition analog pin 26 and 27. Not sure how to do that one. Just want to document it.

  3. #2428
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    8,620
    Quote Originally Posted by mjs513 View Post
    Not sure you need he SPI changes because it will run with SPI.setMOSI(#) just as well. But you will probably need his core files for the additional pins.

    Not sure Kurt broke Audio with his spi changes .
    I scanned the changes twice and it looked just like pin edits and division of 1062 and 1052 groups I'll backup cores this time and try again. One odd thing was a diff in the 'T_3.6' startup change from last beta that CodeCompare showed?

    Maybe I'll stick to ZIP downloads. I did a CORE fork and it wouldn't do a sync until I merged and I hadn't touched files - and it was in an old branch?

    I did try once and just again with SPI. instead of the SPI2. you indicated - still fails.

    Maybe it needs those Core changes and is failing silently when the pin#'s are VOID ...

  4. #2429
    Senior Member+ KurtE's Avatar
    Join Date
    Jan 2014
    Posts
    4,722
    Sorry I was out to lunch

    Looks like Paul took in the changes to both Core and SPI library.

    As for testing SPI1, no, I have not yet done any testing on it as don't have any setup yet with access to these pins. Maybe now I need to finish some form of breakout board for some projects...

    The last round should have had very few changes to the SPI object. It does set the Input select mux, but I think those are all default pins for them (0)... And I did test SPI on B2 board with ILI9341_t3 library (our update version)... Maybe we should do a PR for it? My look through SPI1 pins I put in ( I believe I needed to Input MUX to non default pins on 2 out of 4 pins).

    Right now still looking at FlexIO... As far as I can tell there is no DMA access for FlexIO3 object.

  5. #2430
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    8,620
    Brought down the "apr24cores-T4_B2_PR.zip" and put that in place over T146 IDE copy - Still no luck with my BB_SD card with code shown SPI or SPI2. Maybe I need to get a Debug monitor connected. Did that last night S#1 and #4 and T4 locks so both ended up puled as I gave Paul notes on the Glowing Power LED.

    ALSO - with that change to Cores - Again I lost audible headphone output from those Audio Examples.

    Reading KurtE's post - maybe I should go get the copy from PJRC.

  6. #2431
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    8,620
    Just pulled Paul's :: apr24cores-master.zip

    Same results - No Audio from headphones that worked with TD_1.46 on T4-2

    Still no usable BB SD card. I'll have to run the Pin test again - maybe they got shifted when I added the resistor for MCLK - though I did not unseat the T4.

    Initializing SD card...initialization failed. Things to check:
    ...

  7. #2432
    Senior Member+ KurtE's Avatar
    Join Date
    Jan 2014
    Posts
    4,722
    @defragster - Not sure what to tell you on this... Not sure what would impact the Audio stuff here.

    I redid my changes to IO pins that built onto what Paul did. So my main changes was to add pins 53-59. Also do to the changes to pins 5-8 and 30... I updated Serial2 as it is now on pins 7 and 8 instead of 6 and 7
    In Particular, most of which covered by Paul's changes:
    Beta 1 Beta 2
    5 33
    6 7
    7 8
    8 6
    33 5
    30 ----------------Different
    31 ----------------Different
    (33-39) added the IO pins for SDCard pins

    My changes were the 33-39 and a few fixes I noticed.

    So again updated Serial2 because of Pin change
    Also removed Serial 8 as pins 30, 31 are now different physical pins which no longer have UART capabilities.

    I believe in Paul's changes he updates some of the PWM changes.

    My SPI library update was to change was mainly to add SPI1 and SPI2 to B2 version of board.
    Could have also added to B1 board but punted as I don't have any way to test either
    Again to support SPI1 and SPi2 found that some of the pins were not the default pins for the Input Select
    for those pins, so added references to the registers for the pins into the SPI hardware structure.....

    Note: You might need the updated SPI library as well.

    As for SD Card initialization failed, I am not sure are you using the SDCard on the Audio board or the SDCard that is part of the breakout board?

    Maybe needs updates SD... library?

  8. #2433
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    20,098
    Quote Originally Posted by KurtE View Post
    So far I found that imxrt.h does not include some of the definitions...
    I've tried to add them all with this commit.

    https://github.com/PaulStoffregen/co...590f8f873b9b8c

    Let me know if there's any more I missed?


    Still have more to go as some of the DMAMUX_SOURCE_... are not defined either.
    I just looked through the huge table on pages 52-60 of the 1060 manual. Don't see FLEXIO3 listed at all.


    Will change CAN3 to 154 and add FLEXIO3 ?
    Opps, fixed.

    https://github.com/PaulStoffregen/co...db109d31c8101c

  9. #2434
    Senior Member+ KurtE's Avatar
    Join Date
    Jan 2014
    Posts
    4,722
    Thanks Paul, will try them out.
    Quote Originally Posted by PaulStoffregen View Post
    I've tried to add them all with this commit.

    https://github.com/PaulStoffregen/co...590f8f873b9b8c

    Let me know if there's any more I missed?



    Quote Originally Posted by PaulStoffregen View Post
    I just looked through the huge table on pages 52-60 of the 1060 manual. Don't see FLEXIO3 listed at all.
    That was my conclusion as well. Looks like no DMA for FlexIO3... FlexIO1/2 are already interesting in that they each have 2 DMA sources each for two different things...
    So you have to be careful on how you use them...

    But will get back to playing with them.

  10. #2435
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    8,620
    Quote Originally Posted by KurtE View Post
    @defragster - Not sure what to tell you on this... Not sure what would impact the Audio stuff here.

    I redid my changes to IO pins that built onto what Paul did. So my main changes was to add pins 53-59. Also do to the changes to pins 5-8 and 30... I updated Serial2 as it is now on pins 7 and 8 instead of 6 and 7
    In Particular, most of which covered by Paul's changes:
    Beta 1 Beta 2
    5 33
    6 7
    7 8
    8 6
    33 5
    30 ----------------Different
    31 ----------------Different
    (33-39) added the IO pins for SDCard pins

    My changes were the 33-39 and a few fixes I noticed.

    So again updated Serial2 because of Pin change
    Also removed Serial 8 as pins 30, 31 are now different physical pins which no longer have UART capabilities.

    I believe in Paul's changes he updates some of the PWM changes.

    My SPI library update was to change was mainly to add SPI1 and SPI2 to B2 version of board.
    Could have also added to B1 board but punted as I don't have any way to test either
    Again to support SPI1 and SPi2 found that some of the pins were not the default pins for the Input Select
    for those pins, so added references to the registers for the pins into the SPI hardware structure.....

    Note: You might need the updated SPI library as well.

    As for SD Card initialization failed, I am not sure are you using the SDCard on the Audio board or the SDCard that is part of the breakout board?

    Maybe needs updates SD... library?
    Thanks Kurt - mjs513 helped me through much of the above - so there are posts on where I am:

    SD on AUDIO board does work - before and after all
    I got the latest SD-master … AFAIK
    I have latest SPI some 6 hours back from your B2_PR tree
    Audio sound does work until I get Either KurtE or Paul's latest CORES into my tree - then it compiles and Serial Prints with no sound - reinstall of td1.46 restored sound - 2nd CORES from ZIP took away sound again.

  11. #2436
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    20,098
    Quote Originally Posted by Frank B View Post
    Soldring pogo-pins for SD is a really a pain Paul - can you offer (=sell) some help for it.. like some stacked boards with the holes on the right place?
    Not sure wether mine align properly or not..
    I have extra plastic parts, pogo pins, screws & nuts. If you want some, just say the word and I'll send you a set.

    But that's just for beta #2. The next boards will change to a 1mm pitch, meant for FFC connector. The link for the connector to buy is on msg #2262.

  12. #2437
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    20,098
    I've uploaded 1.47-beta1 with (hopefully) all the recent changes rolled up.

    As usual, download links are on msg #2.

    This version uses the 1062's fast GPIO registers. This almost certainly breaks attachInterrupt. Will fix soon....

  13. #2438
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    8,620
    Windows Installed 1.47b1 - All Good! AUDIO SOUNDS WORKS!

    No SD - going to recheck the pins with sketch … worked last night.

    Except 3.3V - all SD pins reading Zero now
    Last edited by defragster; 04-25-2019 at 03:03 AM.

  14. #2439
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    8,620
    Quote Originally Posted by PaulStoffregen View Post
    I've uploaded 1.47-beta1 with (hopefully) all the recent changes rolled up.

    As usual, download links are on msg #2.

    This version uses the 1062's fast GPIO registers. This almost certainly breaks attachInterrupt. Will fix soon....
    Paul - My SD pins are Dead with 1.47b1 - went back to prior IDE with 1.46b11 and your posted sketch shows ~1.55V on the pins - except GND and 3.3V.

    Probed bottom pads under PCB and they were Zero as well before I went to alternate IDE

  15. #2440
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    20,098
    Quote Originally Posted by defragster View Post
    your posted sketch shows ~1.55V on the pins - except GND and 3.3V.
    That's what you're supposed to see, if you've got your multimeter in DC voltage mode. That test is meant to be done with frequency measurement, so you can check that all 6 pins have a *different* frequency. They're supposed to be powers of 2, from ~156 Hz to ~5000 Hz.

  16. #2441
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    8,620
    Problem is they all read ZERO with 1.47b1

    Quote Originally Posted by PaulStoffregen View Post
    That's what you're supposed to see, if you've got your multimeter in DC voltage mode. That test is meant to be done with frequency measurement, so you can check that all 6 pins have a *different* frequency. They're supposed to be powers of 2, from ~156 Hz to ~5000 Hz.
    Yes as expected - I'm not sure I have a suitable Freq meter. But going back to 1.46b11 they read a usable value.

    I found my Meter with Hz and it does catch unique freq in that range for each pin - Just now with TD 1.46b11

    Upload same sketch built on 1.47b1 and nothing in that range - it may trigger a couple Hz then tend to zero - probing those tiny close pins not a developed skill.
    Last edited by defragster; 04-25-2019 at 04:57 AM.

  17. #2442
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    8,620
    Paul: This is the problem code in :: T:\Ard186t4b2\hardware\teensy\avr\cores\teensy4\st artup.c

    Code:
    #if defined(XX__IMXRT1062__)
    	// Use fast GPIO6, GPIO7, GPIO8, GPIO9
    	IOMUXC_GPR_GPR26 = 0xFFFFFFFF;
    	IOMUXC_GPR_GPR27 = 0xFFFFFFFF;
    	IOMUXC_GPR_GPR28 = 0xFFFFFFFF;
    	IOMUXC_GPR_GPR29 = 0xFFFFFFFF;
    #endif
    Adding XX and I have frequencies on the SDIO pins

    <edit>: With or without that change to fix testing sketch - I still haven't got a properly coded Cardifno.ino to see the breakout sdio card though.
    But did get same sketch to work on Audio Board SD socket with the same flash cards a bit ago - though not now to confirm.

    <edit #2>: Reverting the above change to use FAST GPIO# - allows the Audio Card SD to work for that Cardinfo.ino

    @mjs513 - you'll appreciate this. I found the above using CodeCompare on the .lst files across the two versions of TeensyDuino in the build folders I saved when I saw this::
    Code:
    600010d4:	484e      	ldr	r0, [pc, #312]	; (60001210 <ResetHandler+0x1dc>)
    	// UARTs run from 24 MHz clock (works if PLL3 off or bypassed)
    	CCM_CSCDR1 = (CCM_CSCDR1 & ~CCM_CSCDR1_UART_CLK_PODF(0x3F)) | CCM_CSCDR1_UART_CLK_SEL;
    
    #if defined(__IMXRT1062__)
    	// Use fast GPIO6, GPIO7, GPIO8, GPIO9
    	IOMUXC_GPR_GPR26 = 0xFFFFFFFF;
    600010d6:	f04f 31ff 	mov.w	r1, #4294967295
    Perhaps a billion changes - but most are just a byte value here or there ...
    Last edited by defragster; 04-25-2019 at 06:01 AM.

  18. #2443
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    20,098
    Oh, I see what's wrong. That code from msg #2250 is using the slow GPIO registers. It won't work now that we've switched to fast GPIO.

    Here's an updated version that works with 1.47-beta1.

    Code:
    // Create 6 different frequencies on the SD card pins
    // for easy testing whether all 6 signals are connected.
    
    void setup()
    {
      GPIO8_GDIR |= (0x3F << 12);
    }
    
    uint32_t n=0;
    
    void loop()
    {
      n++;
      GPIO8_DR = (GPIO8_DR & ~(0x3F << 12)) | ((n & 0x3F) << 12);
      delayMicroseconds(100);
    }

  19. #2444
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    8,620
    Nice! That exposes that for correction. They engineered a lot of details and differences in that silicon … I suppose that is why I lost Audio output before 1.47b1 was done as I had one half of a similar change but not the other?

    I'm still lost on getting an SDIO sketch to run on the breakoutboard? mjs513 gave me the right SPI(2) pin# and function - but as posted p#2422 in CardInfo it didn't ever see a device or contents.

    For ref SDIO pins L>R in KHz from my DMM::
    1: .64
    2: 1.26
    3: 0 :: GND
    4: 2.51
    5: .02-.03 :: 3.28V
    6: 5.02
    7: .17
    8: .32

  20. #2445
    Senior Member+ manitou's Avatar
    Join Date
    Jan 2013
    Posts
    1,976
    Quote Originally Posted by KurtE View Post
    Right now still looking at FlexIO... As far as I can tell there is no DMA access for FlexIO3 object.
    The NXP 1062 SDK has FLEXIO3_IRQn = 156

    it's also defined in Table 3-2 for 1060 ref. (rev 1) pg 52

    Also note, only 1 IRQ for GPIO6-9
    Last edited by manitou; 04-25-2019 at 10:22 AM.

  21. #2446
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    20,098
    Quote Originally Posted by manitou View Post
    The NXP 1062 SDK has FLEXIO3_IRQn = 156
    But the big question is DMA mux, not IRQ. Or whether DMA is even possible with FlexIO3...

  22. #2447
    Senior Member+ manitou's Avatar
    Join Date
    Jan 2013
    Posts
    1,976
    Quote Originally Posted by PaulStoffregen View Post
    But the big question is DMA mux, not IRQ. Or whether DMA is even possible with FlexIO3...
    My bad. I see nothing in NXP 1062 SDK defining kDmaRequestMuxFlexIO3

  23. #2448
    Senior Member+
    Join Date
    Jul 2014
    Location
    New York
    Posts
    3,347
    Quote Originally Posted by defragster View Post
    Nice! That exposes that for correction. They engineered a lot of details and differences in that silicon … I suppose that is why I lost Audio output before 1.47b1 was done as I had one half of a similar change but not the other?

    I'm still lost on getting an SDIO sketch to run on the breakoutboard? mjs513 gave me the right SPI(2) pin# and function - but as posted p#2422 in CardInfo it didn't ever see a device or contents.

    …..
    Just installed the latest 1.47b1 using post#2 link and ran the "cardinfo" sketch in the SD library using this setup:
    Code:
    const int chipSelect = BUILTIN_SDCARD;    
    
    void setup()
    {
      //UNCOMMENT THESE TWO LINES FOR TEENSY AUDIO BOARD:
      SPI.setMOSI(35);  // Audio shield has MOSI on pin 7
      SPI.setSCK(37);  // Audio shield has SCK on pin 14
      SPI.setMISO(34);
    and got this on the SerialMon (just showing partial):
    Code:
    Initializing SD card...Wiring is correct and a card is present.
    
    Card type: SDHC
    
    Volume type is FAT32
    
    Volume size (Kbytes): 62360064
    Volume size (Mbytes): 60898
    
    Files found on the card (name, date and size in bytes): 
    SYSTEM~1/     2019-02-04 18:09:00
      INDEXE~1      2019-02-04 20:14:44 76
      WPSETT~1.DAT  2019-02-05 21:06:12 12
    I also reading from the audio board and got the same results.

    Windows Installed 1.47b1 - All Good! AUDIO SOUNDS WORKS!
    Won't be able to check audio - afraid going to ruin board if I attempt the mod with smd resistor - my soldering just aint that good - getting better though.

    Yes - two of my favorite apps for this has been CodeCompare and grepWin !
    Last edited by mjs513; 04-25-2019 at 11:04 AM. Reason: Added responses to more posts

  24. #2449
    Senior Member+ Frank B's Avatar
    Join Date
    Apr 2014
    Location
    Germany NRW
    Posts
    5,605
    Quote Originally Posted by mjs513 View Post
    Won't be able to check audio - afraid going to ruin board if I attempt the mod with smd resistor - my soldering just aint that good - getting better though.
    I don't think it has to be a SMD part - a through-hole resistor, soldered to the pins should do it, too? I'd cut the trace on both ends, it this case.

  25. #2450
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    20,098
    Quote Originally Posted by mjs513 View Post
    Won't be able to check audio - afraid going to ruin board if I attempt the mod with smd resistor - my soldering just aint that good - getting better though.
    No problem, I'll send you another board with the resistor added. It's quick & easy without soldering most of the non-audio parts. I'm also out of the plastic bases. But there's plenty of extra breakout boards which aren't going to be used, since the next rev changes to a 1 mm pitch pads for a FFC connector.

Posting Permissions

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