Forum Rule: Always post complete source code & details to reproduce any issue!
Page 1 of 2 1 2 LastLast
Results 1 to 25 of 32

Thread: Teensyduino 1.53 Beta #3

  1. #1
    Administrator Paul's Avatar
    Join Date
    Oct 2012
    Posts
    375

    Teensyduino 1.53 Beta #3

    Here is a third beta test for Teensyduino 1.53.


    Linux 32 bit:
    https://www.pjrc.com/teensy/td_153-b...nstall.linux32

    Linux 64 bit:
    https://www.pjrc.com/teensy/td_153-b...nstall.linux64

    Linux ARM:
    https://www.pjrc.com/teensy/td_153-b...stall.linuxarm

    Linux ARM64:
    https://www.pjrc.com/teensy/td_153-b...l.linuxaarch64

    MacOS 10.10 to 10.15:
    https://www.pjrc.com/teensy/td_153-b...S_Catalina.zip

    MacOS 10.8 to 10.14:
    https://www.pjrc.com/teensy/td_153-b...inoInstall.dmg

    Windows:
    https://www.pjrc.com/teensy/td_153-b...inoInstall.exe


    Changes since Teensyduino 1.53-beta2:

    Add SPI.end() on Teensy 4.x (KurtE)
    Fix PT8211 output on Teensy 4.x
    Fix USB BDT clear at startup on Teensy 3.x (Memotech-Bill)
    Add digitalToggle(pin)
    Fix numerical overflow in Audio CPU usage on Teensy 4.x
    Remane addStorage to addMemory
    Add Teensy 3.5/3.6 hardware random to Entropy (Manitou)
    Fix ILI9341_r4 readcommand() & add readScanLine() on Teensy 4.x
    Installer will delete old/stale libraries
    Linux installer checks udev rules
    Libraries updated: ADC, ILI9488_t3, RA8875

  2. #2
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    11,929
    Download Windows - for Win 10 current
    Close IDE/TD
    Install TD 1.53b3
    Open IDE 1.8.13
    Compile/upload/T_SerMon simple T_3.2 sketch
    Change to T_4.1
    Compile/upload/T_SerMon same simple sketch
    ------
    ALL GOOD

  3. #3
    Member
    Join Date
    Oct 2019
    Location
    Calgary
    Posts
    65
    Linux ARM on Raspbian Stretch

    The installer picked up on the fact that I'd modified the udev rule file to add a symlink. And it allowed me to skip the check, which was a nice touch and appreciated.

    No troubles with my usual T4.x compiles and links. So far, so good.

  4. #4
    Senior Member
    Join Date
    Aug 2017
    Posts
    296
    Linux Ubuntu 18.04.1

    Installed on Ardunio 1.8.13. So far everything is working well. The only thing I have trouble with is running teensy41_psram_memtest.ino. It still fails unless I modify startup.c as per this post:
    https://forum.pjrc.com/threads/60532...l=1#post241081

    Am I missing something? Has anybody else had this problem?

    Thanks

  5. #5
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    11,929
    Quote Originally Posted by wwatson View Post
    Linux Ubuntu 18.04.1

    Installed on Ardunio 1.8.13. So far everything is working well. The only thing I have trouble with is running teensy41_psram_memtest.ino. It still fails unless I modify startup.c as per this post:
    https://forum.pjrc.com/threads/60532...l=1#post241081

    Am I missing something? Has anybody else had this problem?

    Thanks
    Running current TD.153b3 on Windows per p#2

    On T_4.1 with 1 8MB PSRAM and 1 16MB FLASH on underside { pre beta T_4.1 } running github.com/PaulStoffregen/teensy41_psram_memtest/blob/master/teensy41_psram_memtest.ino

    Have run it twice to good effect:
    Code:
    EXTMEM Memory Test, 8 Mbyte
     CCM_CBCMR=B5AE8304 (88.0 MHz)
    testing with fixed pattern 5A698421
    testing with pseudo-random sequence, seed=2976674124
    ...
    testing with fixed pattern 00000000
     test ran for 36.65 seconds
    All memory tests passed :-)
    ... update pending - will go get twin 8MB PSRAM T_4.1 ...

  6. #6
    Senior Member
    Join Date
    Aug 2017
    Posts
    296
    Quote Originally Posted by defragster View Post
    Running current TD.153b3 on Windows per p#2

    On T_4.1 with 1 8MB PSRAM and 1 16MB FLASH on underside { pre beta T_4.1 } running github.com/PaulStoffregen/teensy41_psram_memtest/blob/master/teensy41_psram_memtest.ino

    Have run it twice to good effect:
    Code:
    EXTMEM Memory Test, 8 Mbyte
     CCM_CBCMR=B5AE8304 (88.0 MHz)
    testing with fixed pattern 5A698421
    testing with pseudo-random sequence, seed=2976674124
    ...
    testing with fixed pattern 00000000
     test ran for 36.65 seconds
    All memory tests passed :-)
    ... update pending - will go get twin 8MB PSRAM T_4.1 ...
    Thanks for checking. Will wait for results.

  7. #7
    Member
    Join Date
    Oct 2019
    Location
    Calgary
    Posts
    65
    Quote Originally Posted by wwatson View Post
    Linux Ubuntu 18.04.1
    ...The only thing I have trouble with is running teensy41_psram_memtest.ino...

    Am I missing something? Has anybody else had this problem?
    Compiled, loaded and ran teensy41_psram_memtest.ino w/o modifications or problems with the following setup and settings (some of which I'm sure don't matter but are included for completeness):

    Arduino 1.8.13, Teensyduino 1.53b3
    Teensy 4.1, USB type: Serial, CPU speed: 600MHz, Optimize: Faster, Keyboard layout: US English, Port: /dev/ttyACM0 Serial (Teensy 4.1)

    The PSRAM chip being used is an ESP32-PSRAM64H scavenged from an ESP32 board.

  8. #8
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    11,929
    Quote Originally Posted by wwatson View Post
    Thanks for checking. Will wait for results.
    Can't find production T_4.1 with the Dual PSRAM's just now ... Note - also ran with no PSRAM and it just saw no PSRAM and quit as expected.

  9. #9
    Senior Member
    Join Date
    Aug 2017
    Posts
    296
    @defragster, @Silverlock,

    I am running a 600MHz, Optimize Fast, psram purchased directly from PJRC. I have done further testing and found some interesting results.

    Instead of this modification:
    Code:
    	// look for the first PSRAM chip
    	flexspi2_command(0, 0); // exit quad mode
    	flexspi2_command(1, 0); // reset enable
    	flexspi2_command(2, 0); // reset (is this really necessary?)
    delayMicroseconds(50);
    	if (flexspi2_psram_id(0) == 0x5D0D) {
    		// first PSRAM chip is present, look for a second PSRAM chip
    		flexspi2_command(4, 0);
    		flexspi2_command(0, 0x800000); // exit quad mode
    		flexspi2_command(1, 0x800000); // reset enable
    		flexspi2_command(2, 0x800000); // reset (is this really necessary?)
    		if (flexspi2_psram_id(0x800000) == 0x5D0D) {
    delayMicroseconds(50);
    			flexspi2_command(4, 0x800000);
    			// Two PSRAM chips are present, 16 MByte
    			external_psram_size = 16;
    		} else {
    			// One PSRAM chip is present, 8 MByte
    			external_psram_size = 8;
    		}
    		// TODO: zero uninitialized EXTMEM variables
    		// TODO: copy from flash to initialize EXTMEM variables
    		// TODO: set up for malloc_extmem()
    	} else {
    		// No PSRAM
    	}
    I kept moving the delayMicroseconds(50); up through the code until the memtest failed. This was just a single delay line.
    The point where it fails is here:
    Code:
    	// initialize pins
    	IOMUXC_SW_PAD_CTL_PAD_GPIO_EMC_22 = 0x1B0F9; // 100K pullup, strong drive, max speed, hyst
    	IOMUXC_SW_PAD_CTL_PAD_GPIO_EMC_23 = 0x110F9; // keeper, strong drive, max speed, hyst
    	IOMUXC_SW_PAD_CTL_PAD_GPIO_EMC_24 = 0x1B0F9; // 100K pullup, strong drive, max speed, hyst
    	IOMUXC_SW_PAD_CTL_PAD_GPIO_EMC_25 = 0x100F9; // strong drive, max speed, hyst
    	IOMUXC_SW_PAD_CTL_PAD_GPIO_EMC_26 = 0x170F9; // 47K pullup, strong drive, max speed, hyst
    	IOMUXC_SW_PAD_CTL_PAD_GPIO_EMC_27 = 0x170F9; // 47K pullup, strong drive, max speed, hyst
    	IOMUXC_SW_PAD_CTL_PAD_GPIO_EMC_28 = 0x170F9; // 47K pullup, strong drive, max speed, hyst
    	IOMUXC_SW_PAD_CTL_PAD_GPIO_EMC_29 = 0x170F9; // 47K pullup, strong drive, max speed, hyst
    delayMicroseconds(43); // psram memtest fails with delay at this point.
    	IOMUXC_SW_MUX_CTL_PAD_GPIO_EMC_22 = 8 | 0x10; // ALT1 = FLEXSPI2_A_SS1_B (Flash)
    	IOMUXC_SW_MUX_CTL_PAD_GPIO_EMC_23 = 8 | 0x10; // ALT1 = FLEXSPI2_A_DQS
    	IOMUXC_SW_MUX_CTL_PAD_GPIO_EMC_24 = 8 | 0x10; // ALT1 = FLEXSPI2_A_SS0_B (RAM)
    	IOMUXC_SW_MUX_CTL_PAD_GPIO_EMC_25 = 8 | 0x10; // ALT1 = FLEXSPI2_A_SCLK
    	IOMUXC_SW_MUX_CTL_PAD_GPIO_EMC_26 = 8 | 0x10; // ALT1 = FLEXSPI2_A_DATA0
    	IOMUXC_SW_MUX_CTL_PAD_GPIO_EMC_27 = 8 | 0x10; // ALT1 = FLEXSPI2_A_DATA1
    	IOMUXC_SW_MUX_CTL_PAD_GPIO_EMC_28 = 8 | 0x10; // ALT1 = FLEXSPI2_A_DATA2
    	IOMUXC_SW_MUX_CTL_PAD_GPIO_EMC_29 = 8 | 0x10; // ALT1 = FLEXSPI2_A_DATA3
    
    
    	IOMUXC_FLEXSPI2_IPP_IND_DQS_FA_SELECT_INPUT = 1; // GPIO_EMC_23 for Mode: ALT8, pg 986
    	IOMUXC_FLEXSPI2_IPP_IND_IO_FA_BIT0_SELECT_INPUT = 1; // GPIO_EMC_26 for Mode: ALT8
    	IOMUXC_FLEXSPI2_IPP_IND_IO_FA_BIT1_SELECT_INPUT = 1; // GPIO_EMC_27 for Mode: ALT8
    	IOMUXC_FLEXSPI2_IPP_IND_IO_FA_BIT2_SELECT_INPUT = 1; // GPIO_EMC_28 for Mode: ALT8
    	IOMUXC_FLEXSPI2_IPP_IND_IO_FA_BIT3_SELECT_INPUT = 1; // GPIO_EMC_29 for Mode: ALT8
    	IOMUXC_FLEXSPI2_IPP_IND_SCK_FA_SELECT_INPUT = 1; // GPIO_EMC_25 for Mode: ALT8
    But with the delay here the memtest works:
    Code:
    	// initialize pins
    	IOMUXC_SW_PAD_CTL_PAD_GPIO_EMC_22 = 0x1B0F9; // 100K pullup, strong drive, max speed, hyst
    	IOMUXC_SW_PAD_CTL_PAD_GPIO_EMC_23 = 0x110F9; // keeper, strong drive, max speed, hyst
    	IOMUXC_SW_PAD_CTL_PAD_GPIO_EMC_24 = 0x1B0F9; // 100K pullup, strong drive, max speed, hyst
    	IOMUXC_SW_PAD_CTL_PAD_GPIO_EMC_25 = 0x100F9; // strong drive, max speed, hyst
    	IOMUXC_SW_PAD_CTL_PAD_GPIO_EMC_26 = 0x170F9; // 47K pullup, strong drive, max speed, hyst
    	IOMUXC_SW_PAD_CTL_PAD_GPIO_EMC_27 = 0x170F9; // 47K pullup, strong drive, max speed, hyst
    	IOMUXC_SW_PAD_CTL_PAD_GPIO_EMC_28 = 0x170F9; // 47K pullup, strong drive, max speed, hyst
    	IOMUXC_SW_PAD_CTL_PAD_GPIO_EMC_29 = 0x170F9; // 47K pullup, strong drive, max speed, hyst
    
    	IOMUXC_SW_MUX_CTL_PAD_GPIO_EMC_22 = 8 | 0x10; // ALT1 = FLEXSPI2_A_SS1_B (Flash)
    	IOMUXC_SW_MUX_CTL_PAD_GPIO_EMC_23 = 8 | 0x10; // ALT1 = FLEXSPI2_A_DQS
    	IOMUXC_SW_MUX_CTL_PAD_GPIO_EMC_24 = 8 | 0x10; // ALT1 = FLEXSPI2_A_SS0_B (RAM)
    	IOMUXC_SW_MUX_CTL_PAD_GPIO_EMC_25 = 8 | 0x10; // ALT1 = FLEXSPI2_A_SCLK
    	IOMUXC_SW_MUX_CTL_PAD_GPIO_EMC_26 = 8 | 0x10; // ALT1 = FLEXSPI2_A_DATA0
    	IOMUXC_SW_MUX_CTL_PAD_GPIO_EMC_27 = 8 | 0x10; // ALT1 = FLEXSPI2_A_DATA1
    	IOMUXC_SW_MUX_CTL_PAD_GPIO_EMC_28 = 8 | 0x10; // ALT1 = FLEXSPI2_A_DATA2
    	IOMUXC_SW_MUX_CTL_PAD_GPIO_EMC_29 = 8 | 0x10; // ALT1 = FLEXSPI2_A_DATA3
    
    delayMicroseconds(43); // psram memtest works with delay at this point.
    
    	IOMUXC_FLEXSPI2_IPP_IND_DQS_FA_SELECT_INPUT = 1; // GPIO_EMC_23 for Mode: ALT8, pg 986
    	IOMUXC_FLEXSPI2_IPP_IND_IO_FA_BIT0_SELECT_INPUT = 1; // GPIO_EMC_26 for Mode: ALT8
    	IOMUXC_FLEXSPI2_IPP_IND_IO_FA_BIT1_SELECT_INPUT = 1; // GPIO_EMC_27 for Mode: ALT8
    	IOMUXC_FLEXSPI2_IPP_IND_IO_FA_BIT2_SELECT_INPUT = 1; // GPIO_EMC_28 for Mode: ALT8
    	IOMUXC_FLEXSPI2_IPP_IND_IO_FA_BIT3_SELECT_INPUT = 1; // GPIO_EMC_29 for Mode: ALT8
    	IOMUXC_FLEXSPI2_IPP_IND_SCK_FA_SELECT_INPUT = 1; // GPIO_EMC_25 for Mode: ALT8
    Curious
    Last edited by wwatson; 06-27-2020 at 09:53 PM. Reason: Sentence correction.

  10. #10
    Senior Member+ mjs513's Avatar
    Join Date
    Jul 2014
    Location
    New York
    Posts
    5,457
    Just saw b3 was released, right on schedule

    Noticed Adafruit GFX was not auto installed with Teensyduino so remember to install it from library manager. It will auto install Adafruit BusIO as well which it now needs to run.

    As a check ran SPIFFS_T4 Flashtest6 and extRAM_t4 structuredReadWrite sketches without issue. All tests passed.

    Since I just installed GDB gave that a try as well with using simple_breakpoint, again no issue.

    Using a T4.0 ran the ILI9488_FontTest4 without no conflicts with the new Adafruit_GFX library.

  11. #11
    Member
    Join Date
    Oct 2019
    Location
    Calgary
    Posts
    65
    Quote Originally Posted by wwatson View Post
    @defragster, @Silverlock,

    I am running a 600MHz, Optimize Fast, psram purchased directly from PJRC.
    Reran the test with Optimize Fast, Optimize Fastest and Smallest Code. All three worked. The only oddity I noticed was that under "Smallest Code" that the result line that usually reads something like " test ran for 36.65 seconds" read " test ran for seconds"; the number disappeared.

    Just for the halibut, on the off, remote chance that the problem exists in the Linux x86 toolchain (I'm on ARM, defragster's on Windows), here's the HEX file produced on the rPi for 600MHz, Optimize Fast. If you unzip it and load the HEX file into the Teensy Loader and upload it and the same thing happens, at least you know you're not dealing with a toolchain issue.
    Attached Files Attached Files

  12. #12
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    11,929
    Quote Originally Posted by wwatson View Post
    @defragster, @Silverlock,

    I am running a 600MHz, Optimize Fast, psram purchased directly from PJRC. I have done further testing and found some interesting results.

    Instead of this modification:
    ...

    Curious
    Indeed - where does the error show in running? - just changed to FAST from default FASTER.

    No CORE mods to TD 1.53b3 install ... it works with twin PSRAMS as above with single and an IDLE QSPI Flash.

    Found the production dual PSRAM T_4.1 as FAST:
    Code:
    EXTMEM Memory Test, 16 Mbyte
     CCM_CBCMR=B5AE8304 (88.0 MHz)
    testing with fixed pattern 5A698421
    testing with pseudo-random sequence, seed=2976674124
    ...
    testing with fixed pattern 00000000
     test ran for 72.51 seconds
    All memory tests passed :-)
    same: dual PSRAM T_4.1 as FASTER - just a 0.9 sec slower:
    Code:
    EXTMEM Memory Test, 16 Mbyte
     CCM_CBCMR=B5AE8304 (88.0 MHz)
    testing with fixed pattern 5A698421
    testing with pseudo-random sequence, seed=2976674124
    ...
    testing with fixed pattern 00000000
     test ran for 73.31 seconds
    All memory tests passed :-)
    <EDIT>: The p#11 gave passed result with the ARM compiled HEX on the 16MB PSRAM T_4.1 with TLoader upload on Windows.

  13. #13
    Senior Member
    Join Date
    Aug 2017
    Posts
    296
    @Silverlock,

    Thanks for the the download. I will upload and test without my mod's to startup.c. I do not have a windows machine so this will help verify the validity of the Linux compiler.

    @defragster,

    The error is this:
    Code:
    EXTMEM Memory Test, 0 Mbyte
    Nothing else except the fast blinking LED on the T4.1 which I believe is an indication of an error.

    I played with it some more and narrowed it down to this:
    Code:
    FLASHMEM void configure_external_ram()
    {
    	// initialize pins
    	IOMUXC_SW_PAD_CTL_PAD_GPIO_EMC_22 = 0x1B0F9; // 100K pullup, strong drive, max speed, hyst
    	IOMUXC_SW_PAD_CTL_PAD_GPIO_EMC_23 = 0x110F9; // keeper, strong drive, max speed, hyst
    	IOMUXC_SW_PAD_CTL_PAD_GPIO_EMC_24 = 0x1B0F9; // 100K pullup, strong drive, max speed, hyst
    	IOMUXC_SW_PAD_CTL_PAD_GPIO_EMC_25 = 0x100F9; // strong drive, max speed, hyst
    	IOMUXC_SW_PAD_CTL_PAD_GPIO_EMC_26 = 0x170F9; // 47K pullup, strong drive, max speed, hyst
    	IOMUXC_SW_PAD_CTL_PAD_GPIO_EMC_27 = 0x170F9; // 47K pullup, strong drive, max speed, hyst
    	IOMUXC_SW_PAD_CTL_PAD_GPIO_EMC_28 = 0x170F9; // 47K pullup, strong drive, max speed, hyst
    	IOMUXC_SW_PAD_CTL_PAD_GPIO_EMC_29 = 0x170F9; // 47K pullup, strong drive, max speed, hyst
    
    	IOMUXC_SW_MUX_CTL_PAD_GPIO_EMC_22 = 8 | 0x10; // ALT1 = FLEXSPI2_A_SS1_B (Flash)
    	IOMUXC_SW_MUX_CTL_PAD_GPIO_EMC_23 = 8 | 0x10; // ALT1 = FLEXSPI2_A_DQS
    	IOMUXC_SW_MUX_CTL_PAD_GPIO_EMC_24 = 8 | 0x10; // ALT1 = FLEXSPI2_A_SS0_B (RAM)
    //delayMicroseconds(50); // psram memtest fails with delay at this point.
    	IOMUXC_SW_MUX_CTL_PAD_GPIO_EMC_25 = 8 | 0x10; // ALT1 = FLEXSPI2_A_SCLK
    delayMicroseconds(50); // psram memtest works with delay at this point.
    	IOMUXC_SW_MUX_CTL_PAD_GPIO_EMC_26 = 8 | 0x10; // ALT1 = FLEXSPI2_A_DATA0
    	IOMUXC_SW_MUX_CTL_PAD_GPIO_EMC_27 = 8 | 0x10; // ALT1 = FLEXSPI2_A_DATA1
    	IOMUXC_SW_MUX_CTL_PAD_GPIO_EMC_28 = 8 | 0x10; // ALT1 = FLEXSPI2_A_DATA2
    	IOMUXC_SW_MUX_CTL_PAD_GPIO_EMC_29 = 8 | 0x10; // ALT1 = FLEXSPI2_A_DATA3
    
    	IOMUXC_FLEXSPI2_IPP_IND_DQS_FA_SELECT_INPUT = 1; // GPIO_EMC_23 for Mode: ALT8, pg 986
    	IOMUXC_FLEXSPI2_IPP_IND_IO_FA_BIT0_SELECT_INPUT = 1; // GPIO_EMC_26 for Mode: ALT8
    	IOMUXC_FLEXSPI2_IPP_IND_IO_FA_BIT1_SELECT_INPUT = 1; // GPIO_EMC_27 for Mode: ALT8
    	IOMUXC_FLEXSPI2_IPP_IND_IO_FA_BIT2_SELECT_INPUT = 1; // GPIO_EMC_28 for Mode: ALT8
    	IOMUXC_FLEXSPI2_IPP_IND_IO_FA_BIT3_SELECT_INPUT = 1; // GPIO_EMC_29 for Mode: ALT8
    	IOMUXC_FLEXSPI2_IPP_IND_SCK_FA_SELECT_INPUT = 1; // GPIO_EMC_25 for Mode: ALT8
    Works.

    This does not work:
    Code:
    FLASHMEM void configure_external_ram()
    {
    	// initialize pins
    	IOMUXC_SW_PAD_CTL_PAD_GPIO_EMC_22 = 0x1B0F9; // 100K pullup, strong drive, max speed, hyst
    	IOMUXC_SW_PAD_CTL_PAD_GPIO_EMC_23 = 0x110F9; // keeper, strong drive, max speed, hyst
    	IOMUXC_SW_PAD_CTL_PAD_GPIO_EMC_24 = 0x1B0F9; // 100K pullup, strong drive, max speed, hyst
    	IOMUXC_SW_PAD_CTL_PAD_GPIO_EMC_25 = 0x100F9; // strong drive, max speed, hyst
    	IOMUXC_SW_PAD_CTL_PAD_GPIO_EMC_26 = 0x170F9; // 47K pullup, strong drive, max speed, hyst
    	IOMUXC_SW_PAD_CTL_PAD_GPIO_EMC_27 = 0x170F9; // 47K pullup, strong drive, max speed, hyst
    	IOMUXC_SW_PAD_CTL_PAD_GPIO_EMC_28 = 0x170F9; // 47K pullup, strong drive, max speed, hyst
    	IOMUXC_SW_PAD_CTL_PAD_GPIO_EMC_29 = 0x170F9; // 47K pullup, strong drive, max speed, hyst
    
    	IOMUXC_SW_MUX_CTL_PAD_GPIO_EMC_22 = 8 | 0x10; // ALT1 = FLEXSPI2_A_SS1_B (Flash)
    	IOMUXC_SW_MUX_CTL_PAD_GPIO_EMC_23 = 8 | 0x10; // ALT1 = FLEXSPI2_A_DQS
    	IOMUXC_SW_MUX_CTL_PAD_GPIO_EMC_24 = 8 | 0x10; // ALT1 = FLEXSPI2_A_SS0_B (RAM)
    delayMicroseconds(50); // psram memtest fails with delay at this point.
    	IOMUXC_SW_MUX_CTL_PAD_GPIO_EMC_25 = 8 | 0x10; // ALT1 = FLEXSPI2_A_SCLK
    //delayMicroseconds(50); // psram memtest works with delay at this point.
    	IOMUXC_SW_MUX_CTL_PAD_GPIO_EMC_26 = 8 | 0x10; // ALT1 = FLEXSPI2_A_DATA0
    	IOMUXC_SW_MUX_CTL_PAD_GPIO_EMC_27 = 8 | 0x10; // ALT1 = FLEXSPI2_A_DATA1
    	IOMUXC_SW_MUX_CTL_PAD_GPIO_EMC_28 = 8 | 0x10; // ALT1 = FLEXSPI2_A_DATA2
    	IOMUXC_SW_MUX_CTL_PAD_GPIO_EMC_29 = 8 | 0x10; // ALT1 = FLEXSPI2_A_DATA3
    
    	IOMUXC_FLEXSPI2_IPP_IND_DQS_FA_SELECT_INPUT = 1; // GPIO_EMC_23 for Mode: ALT8, pg 986
    	IOMUXC_FLEXSPI2_IPP_IND_IO_FA_BIT0_SELECT_INPUT = 1; // GPIO_EMC_26 for Mode: ALT8
    	IOMUXC_FLEXSPI2_IPP_IND_IO_FA_BIT1_SELECT_INPUT = 1; // GPIO_EMC_27 for Mode: ALT8
    	IOMUXC_FLEXSPI2_IPP_IND_IO_FA_BIT2_SELECT_INPUT = 1; // GPIO_EMC_28 for Mode: ALT8
    	IOMUXC_FLEXSPI2_IPP_IND_IO_FA_BIT3_SELECT_INPUT = 1; // GPIO_EMC_29 for Mode: ALT8
    	IOMUXC_FLEXSPI2_IPP_IND_SCK_FA_SELECT_INPUT = 1; // GPIO_EMC_25 for Mode: ALT8
    Got to make dinner for the grand kid now but will test (@Silverlock) the windows version after.

  14. #14
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    11,929
    Quote Originally Posted by wwatson View Post
    @Silverlock,

    Thanks for the the download. I will upload and test without my mod's to startup.c. I do not have a windows machine so this will help verify the validity of the Linux compiler.

    @defragster,

    The error is this:
    Code:
    EXTMEM Memory Test, 0 Mbyte
    Nothing else except the fast blinking LED on the T4.1 which I believe is an indication of an error.

    ...
    Got to make dinner for the grand kid now but will test (@Silverlock) the windows version after.
    The FAST BLINK is what shows here on T_4.1 with NO PSRAM.

    That just says it failed to detect PSRAM?
    Code:
      uint8_t size = external_psram_size;
      Serial.printf("EXTMEM Memory Test, %d Mbyte\n", size);
      if (size == 0) return;
    So it entered loop() before setting :: memory_ok = true;

    Somehow your attached chip not passing the 'present' test as coded. Wonder if a quick reflow/clean of the PSRAM pins would change it and show the code wasn't needing tweaked - but rather 'a failure to communicate' properly that may cause trouble later?

    Unless of course the provided ARM built HEX works ...

  15. #15
    Member
    Join Date
    Oct 2019
    Location
    Calgary
    Posts
    65
    Quote Originally Posted by defragster View Post
    Unless of course the provided ARM built HEX works ...
    And I'll be fairly surprised if that happens. My hunch is a marginal solder joint or a bit of flux where it oughtn't to be.

  16. #16
    Senior Member
    Join Date
    Aug 2017
    Posts
    296
    @Silverlock - The other build did not work.
    I think you both are right. I will touch up the soldering and see what happens. I have two more T41's and more psram chips to solder up and test. Will probably just do one psram chip as I want to order flash chips and install those.

    Thanks guys for your help

    Edit: I will take a picture of the current soldering and post that for inspection.
    The solder I am using is a 60/40 rosin core 18 gauge solder I got when I worked for Radio Shack years ago.

  17. #17
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    22,235
    Quote Originally Posted by Silverlock View Post
    Just for the halibut, on the off, remote chance that the problem exists in the Linux x86 toolchain (I'm on ARM, defragster's on Windows), here's the HEX file produced on the rPi for 600MHz, Optimize Fast. If you unzip it and load the HEX file into the Teensy Loader and upload it and the same thing happens, at least you know you're not dealing with a toolchain issue.
    I loaded this hex file (from msg #11) onto 4 different Teensy 4.1 boards. On every board it properly detected the external memory and all tests passed. One board had 2 memory chips. One had just 1 chip with the larger pads unused, and two had 1 RAM chip and 1 flash chip.

    Click image for larger version. 

Name:	sc.jpg 
Views:	7 
Size:	146.4 KB 
ID:	20777

  18. #18
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    22,235
    Quote Originally Posted by Silverlock View Post
    The only oddity I noticed was that under "Smallest Code" that the result line that usually reads something like " test ran for 36.65 seconds" read " test ran for seconds"; the number disappeared.
    This is normal. "Smallest Code" causes a smaller no-float printf() to be used from the C library. Omitting floating point support from printf() saves about 20K of code size. That's a really good trade-off when you need smaller code, especially on Teensy LC where there's only 62K of flash available. But it does mean you get nothing printed where %f is used with printf().

    Ideally these sorts of example programs should use Arduino's Serial.print() only, which does support float printing in all optimization levels. But to be honest, I didn't even think of that when I wrote it. I was so focused at the time on checking whether the RAM chips were really working and giving people who've just soldered their chip a pretty through test program.

  19. #19
    Senior Member
    Join Date
    Aug 2019
    Location
    southwest USA
    Posts
    114
    under win7pro64: uninstall arduino 1.8.5 (and teensyduino 1.52), install arduino 1.8.13, install teensyduino 1.53 beta 3,
    compiled and ran just fine several programs each for TLC, T36, T4. some TLC and T36 pgms date back 2-2.5 years,
    T4 from about time of intro. all compiles fine, all uploads fine, all runs fine, serial monitor working well and very snappy.
    see no problems here.

  20. #20
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    22,235
    Has anyone tried using the updated ADC library yet? It got a large number of lines edited, though much of it appears to be cleaning up white space.

  21. #21
    Senior Member
    Join Date
    May 2015
    Location
    USA
    Posts
    451
    Work fine for me, although synchronous ADC reads went from .78 usec to .79 usec per sample.

  22. #22
    Senior Member
    Join Date
    Aug 2019
    Location
    southwest USA
    Posts
    114
    compiles using ADC library worked ok TLC, T35, T4. (of course using the new settings syntax i had to do for 1.52)
    ala
    adc->adc0->setAveraging(1);
    etc
    have not timed any ADC yet

  23. #23
    Senior Member
    Join Date
    Aug 2019
    Location
    southwest USA
    Posts
    114
    did closer inspection of compile reports re ADC under 1.53 beta 3 and found something that is not an error,
    not a warning, but i don't remember it from past releases. as per previous post TLC T36 T4 all compile and
    run fine. all have this little funny in the compile listing - i have no idea if it is of any significance.

    boiled down code for T4 is:
    Code:
        #include <ADC.h>
    
          unsigned short int i,j,n;
          unsigned int value1,value2;
    
        ADC *adc = new ADC(); // adc object;
    
      const int readPin = A0; // ADC0
      const int readPin2 = A1; // ADC1
    
        int main() {
    
        Serial.begin(38400);
        delay(500);
        
            pinMode(readPin,  INPUT);
            pinMode(readPin2, INPUT);
    
            pinMode(A10, INPUT); //Diff Channel 0 Positive
            pinMode(A11, INPUT); //Diff Channel 0 Negative
    
            adc->adc0->setAveraging(1);
            adc->adc0->setResolution(12);
            adc->adc0->setConversionSpeed(ADC_CONVERSION_SPEED::VERY_HIGH_SPEED);
            adc->adc0->setSamplingSpeed(ADC_SAMPLING_SPEED::VERY_HIGH_SPEED);
    // comment next 4 lines for TLC
            adc->adc1->setAveraging(1);
            adc->adc1->setResolution(12);
            adc->adc1->setConversionSpeed(ADC_CONVERSION_SPEED::VERY_HIGH_SPEED);
            adc->adc1->setSamplingSpeed(ADC_SAMPLING_SPEED::VERY_HIGH_SPEED);
    
        loop:
    
        value1 = adc->analogRead(readPin);
        value2 = adc->analogRead(readPin2);
        Serial.println(value1);
        Serial.println(value2);
        Serial.println(" ");
        delay(2000);
         goto loop;
    
        }
    part of compile listing that seems new is:
    Code:
    Detecting libraries used...
    "C:\\Program Files (x86)\\Arduino\\hardware\\teensy/.............
    Alternatives for ADC.h: [ADC@8.0]
    ResolveLibrary(ADC.h)
      -> candidates: [ADC@8.0]
    entire compile listing is:

    Code:
    C:\Program Files (x86)\Arduino\arduino-builder -dump-prefs -logger=machine -hardware C:\Program Files (x86)\Arduino\hardware -tools C:\Program Files (x86)\Arduino\tools-builder -tools C:\Program Files (x86)\Arduino\hardware\tools\avr -built-in-libraries C:\Program Files (x86)\Arduino\libraries -libraries C:\Users\Dell\Documents\Arduino\libraries -fqbn=teensy:avr:teensy40:usb=serial,speed=600,opt=o2std,keys=en-us -ide-version=10813 -build-path C:\Users\Dell\AppData\Local\Temp\arduino_build_518865 -warnings=none -build-cache C:\Users\Dell\AppData\Local\Temp\arduino_cache_273839 -verbose C:\Users\Dell\Documents\Arduino\libraries\arf1\arf1.ino
    C:\Program Files (x86)\Arduino\arduino-builder -compile -logger=machine -hardware C:\Program Files (x86)\Arduino\hardware -tools C:\Program Files (x86)\Arduino\tools-builder -tools C:\Program Files (x86)\Arduino\hardware\tools\avr -built-in-libraries C:\Program Files (x86)\Arduino\libraries -libraries C:\Users\Dell\Documents\Arduino\libraries -fqbn=teensy:avr:teensy40:usb=serial,speed=600,opt=o2std,keys=en-us -ide-version=10813 -build-path C:\Users\Dell\AppData\Local\Temp\arduino_build_518865 -warnings=none -build-cache C:\Users\Dell\AppData\Local\Temp\arduino_cache_273839 -verbose C:\Users\Dell\Documents\Arduino\libraries\arf1\arf1.ino
    Using board 'teensy40' from platform in folder: C:\Program Files (x86)\Arduino\hardware\teensy\avr
    Using core 'teensy4' from platform in folder: C:\Program Files (x86)\Arduino\hardware\teensy\avr
    Detecting libraries used...
    "C:\\Program Files (x86)\\Arduino\\hardware\\teensy/../tools/arm/bin/arm-none-eabi-g++" -E -CC -x c++ -w -g -Wall -ffunction-sections -fdata-sections -nostdlib -std=gnu++14 -fno-exceptions -fpermissive -fno-rtti -fno-threadsafe-statics -felide-constructors -Wno-error=narrowing -mthumb -mcpu=cortex-m7 -mfloat-abi=hard -mfpu=fpv5-d16 -D__IMXRT1062__ -DTEENSYDUINO=153 -DARDUINO=10813 -DARDUINO_TEENSY40 -DF_CPU=600000000 -DUSB_SERIAL -DLAYOUT_US_ENGLISH "-IC:\\Program Files (x86)\\Arduino\\hardware\\teensy\\avr\\cores\\teensy4" "C:\\Users\\Dell\\AppData\\Local\\Temp\\arduino_build_518865\\sketch\\arf1.ino.cpp" -o nul -DARDUINO_LIB_DISCOVERY_PHASE
    Alternatives for ADC.h: [ADC@8.0]
    ResolveLibrary(ADC.h)
      -> candidates: [ADC@8.0]
    "C:\\Program Files (x86)\\Arduino\\hardware\\teensy/../tools/arm/bin/arm-none-eabi-g++" -E -CC -x c++ -w -g -Wall -ffunction-sections -fdata-sections -nostdlib -std=gnu++14 -fno-exceptions -fpermissive -fno-rtti -fno-threadsafe-statics -felide-constructors -Wno-error=narrowing -mthumb -mcpu=cortex-m7 -mfloat-abi=hard -mfpu=fpv5-d16 -D__IMXRT1062__ -DTEENSYDUINO=153 -DARDUINO=10813 -DARDUINO_TEENSY40 -DF_CPU=600000000 -DUSB_SERIAL -DLAYOUT_US_ENGLISH "-IC:\\Program Files (x86)\\Arduino\\hardware\\teensy\\avr\\cores\\teensy4" "-IC:\\Program Files (x86)\\Arduino\\hardware\\teensy\\avr\\libraries\\ADC" "C:\\Users\\Dell\\AppData\\Local\\Temp\\arduino_build_518865\\sketch\\arf1.ino.cpp" -o nul -DARDUINO_LIB_DISCOVERY_PHASE
    Using cached library dependencies for file: C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\ADC\ADC.cpp
    Using cached library dependencies for file: C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\ADC\ADC_Module.cpp
    Using cached library dependencies for file: C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\ADC\AnalogBufferDMA.cpp
    Generating function prototypes...
    "C:\\Program Files (x86)\\Arduino\\hardware\\teensy/../tools/arm/bin/arm-none-eabi-g++" -E -CC -x c++ -w -g -Wall -ffunction-sections -fdata-sections -nostdlib -std=gnu++14 -fno-exceptions -fpermissive -fno-rtti -fno-threadsafe-statics -felide-constructors -Wno-error=narrowing -mthumb -mcpu=cortex-m7 -mfloat-abi=hard -mfpu=fpv5-d16 -D__IMXRT1062__ -DTEENSYDUINO=153 -DARDUINO=10813 -DARDUINO_TEENSY40 -DF_CPU=600000000 -DUSB_SERIAL -DLAYOUT_US_ENGLISH "-IC:\\Program Files (x86)\\Arduino\\hardware\\teensy\\avr\\cores\\teensy4" "-IC:\\Program Files (x86)\\Arduino\\hardware\\teensy\\avr\\libraries\\ADC" "C:\\Users\\Dell\\AppData\\Local\\Temp\\arduino_build_518865\\sketch\\arf1.ino.cpp" -o "C:\\Users\\Dell\\AppData\\Local\\Temp\\arduino_build_518865\\preproc\\ctags_target_for_gcc_minus_e.cpp" -DARDUINO_LIB_DISCOVERY_PHASE
    "C:\\Program Files (x86)\\Arduino\\tools-builder\\ctags\\5.8-arduino11/ctags" -u --language-force=c++ -f - --c++-kinds=svpf --fields=KSTtzns --line-directives "C:\\Users\\Dell\\AppData\\Local\\Temp\\arduino_build_518865\\preproc\\ctags_target_for_gcc_minus_e.cpp"
    Compiling sketch...
    "C:\\Program Files (x86)\\Arduino\\hardware\\teensy/../tools/precompile_helper" "C:\\Program Files (x86)\\Arduino\\hardware\\teensy\\avr/cores/teensy4" "C:\\Users\\Dell\\AppData\\Local\\Temp\\arduino_build_518865" "C:\\Program Files (x86)\\Arduino\\hardware\\teensy/../tools/arm/bin/arm-none-eabi-g++" -x c++-header -O2 -g -Wall -ffunction-sections -fdata-sections -nostdlib -MMD -std=gnu++14 -fno-exceptions -fpermissive -fno-rtti -fno-threadsafe-statics -felide-constructors -Wno-error=narrowing -mthumb -mcpu=cortex-m7 -mfloat-abi=hard -mfpu=fpv5-d16 -D__IMXRT1062__ -DTEENSYDUINO=153 -DARDUINO=10813 -DARDUINO_TEENSY40 -DF_CPU=600000000 -DUSB_SERIAL -DLAYOUT_US_ENGLISH "-IC:\\Program Files (x86)\\Arduino\\hardware\\teensy\\avr/cores/teensy4" "C:\\Users\\Dell\\AppData\\Local\\Temp\\arduino_build_518865/pch/Arduino.h" -o "C:\\Users\\Dell\\AppData\\Local\\Temp\\arduino_build_518865/pch/Arduino.h.gch"
    Using previously compiled file: C:\Users\Dell\AppData\Local\Temp\arduino_build_518865\pch\Arduino.h.gch
    "C:\\Program Files (x86)\\Arduino\\hardware\\teensy/../tools/arm/bin/arm-none-eabi-g++" -c -O2 -g -Wall -ffunction-sections -fdata-sections -nostdlib -MMD -std=gnu++14 -fno-exceptions -fpermissive -fno-rtti -fno-threadsafe-statics -felide-constructors -Wno-error=narrowing -mthumb -mcpu=cortex-m7 -mfloat-abi=hard -mfpu=fpv5-d16 -D__IMXRT1062__ -DTEENSYDUINO=153 -DARDUINO=10813 -DARDUINO_TEENSY40 -DF_CPU=600000000 -DUSB_SERIAL -DLAYOUT_US_ENGLISH "-IC:\\Users\\Dell\\AppData\\Local\\Temp\\arduino_build_518865/pch" "-IC:\\Program Files (x86)\\Arduino\\hardware\\teensy\\avr\\cores\\teensy4" "-IC:\\Program Files (x86)\\Arduino\\hardware\\teensy\\avr\\libraries\\ADC" "C:\\Users\\Dell\\AppData\\Local\\Temp\\arduino_build_518865\\sketch\\arf1.ino.cpp" -o "C:\\Users\\Dell\\AppData\\Local\\Temp\\arduino_build_518865\\sketch\\arf1.ino.cpp.o"
    Compiling libraries...
    Compiling library "ADC"
    Using previously compiled file: C:\Users\Dell\AppData\Local\Temp\arduino_build_518865\libraries\ADC\AnalogBufferDMA.cpp.o
    Using previously compiled file: C:\Users\Dell\AppData\Local\Temp\arduino_build_518865\libraries\ADC\ADC_Module.cpp.o
    Using previously compiled file: C:\Users\Dell\AppData\Local\Temp\arduino_build_518865\libraries\ADC\ADC.cpp.o
    Compiling core...
    Using precompiled core: C:\Users\Dell\AppData\Local\Temp\arduino_cache_273839\core\core_88a2d4dfef9509c3677628f3762a6fb0.a
    Linking everything together...
    "C:\\Program Files (x86)\\Arduino\\hardware\\teensy/../tools/arm/bin/arm-none-eabi-gcc" -O2 -Wl,--gc-sections,--relax "-TC:\\Program Files (x86)\\Arduino\\hardware\\teensy\\avr\\cores\\teensy4/imxrt1062.ld" -mthumb -mcpu=cortex-m7 -mfloat-abi=hard -mfpu=fpv5-d16 -o "C:\\Users\\Dell\\AppData\\Local\\Temp\\arduino_build_518865/arf1.ino.elf" "C:\\Users\\Dell\\AppData\\Local\\Temp\\arduino_build_518865\\sketch\\arf1.ino.cpp.o" "C:\\Users\\Dell\\AppData\\Local\\Temp\\arduino_build_518865\\libraries\\ADC\\ADC.cpp.o" "C:\\Users\\Dell\\AppData\\Local\\Temp\\arduino_build_518865\\libraries\\ADC\\ADC_Module.cpp.o" "C:\\Users\\Dell\\AppData\\Local\\Temp\\arduino_build_518865\\libraries\\ADC\\AnalogBufferDMA.cpp.o" "C:\\Users\\Dell\\AppData\\Local\\Temp\\arduino_build_518865/..\\arduino_cache_273839\\core\\core_88a2d4dfef9509c3677628f3762a6fb0.a" "-LC:\\Users\\Dell\\AppData\\Local\\Temp\\arduino_build_518865" -larm_cortexM7lfsp_math -lm -lstdc++
    "C:\\Program Files (x86)\\Arduino\\hardware\\teensy/../tools/arm/bin/arm-none-eabi-objcopy" -O ihex -j .eeprom --set-section-flags=.eeprom=alloc,load --no-change-warnings --change-section-lma .eeprom=0 "C:\\Users\\Dell\\AppData\\Local\\Temp\\arduino_build_518865/arf1.ino.elf" "C:\\Users\\Dell\\AppData\\Local\\Temp\\arduino_build_518865/arf1.ino.eep"
    "C:\\Program Files (x86)\\Arduino\\hardware\\teensy/../tools/arm/bin/arm-none-eabi-objcopy" -O ihex -R .eeprom "C:\\Users\\Dell\\AppData\\Local\\Temp\\arduino_build_518865/arf1.ino.elf" "C:\\Users\\Dell\\AppData\\Local\\Temp\\arduino_build_518865/arf1.ino.hex"
    "C:\\Program Files (x86)\\Arduino\\hardware\\teensy/../tools/stdout_redirect" "C:\\Users\\Dell\\AppData\\Local\\Temp\\arduino_build_518865/arf1.ino.lst" "C:\\Program Files (x86)\\Arduino\\hardware\\teensy/../tools/arm/bin/arm-none-eabi-objdump" -d -S -C "C:\\Users\\Dell\\AppData\\Local\\Temp\\arduino_build_518865/arf1.ino.elf"
    "C:\\Program Files (x86)\\Arduino\\hardware\\teensy/../tools/stdout_redirect" "C:\\Users\\Dell\\AppData\\Local\\Temp\\arduino_build_518865/arf1.ino.sym" "C:\\Program Files (x86)\\Arduino\\hardware\\teensy/../tools/arm/bin/arm-none-eabi-objdump" -t -C "C:\\Users\\Dell\\AppData\\Local\\Temp\\arduino_build_518865/arf1.ino.elf"
    "C:\\Program Files (x86)\\Arduino\\hardware\\teensy/../tools/teensy_post_compile" -file=arf1.ino "-path=C:\\Users\\Dell\\AppData\\Local\\Temp\\arduino_build_518865" "-tools=C:\\Program Files (x86)\\Arduino\\hardware\\teensy/../tools/" -board=TEENSY40
    Using library ADC at version 8.0 in folder: C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\ADC 
    "C:\\Program Files (x86)\\Arduino\\hardware\\teensy/../tools/arm/bin/arm-none-eabi-size" -A "C:\\Users\\Dell\\AppData\\Local\\Temp\\arduino_build_518865/arf1.ino.elf"
    Sketch uses 50528 bytes (2%) of program storage space. Maximum is 2031616 bytes.
    Global variables use 86708 bytes (16%) of dynamic memory, leaving 437580 bytes for local variables. Maximum is 524288 bytes.

  24. #24
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    22,235
    Maybe you also upgraded Arduino to 1.8.13? This looks like some of the new stuff 1.8.13 prints as it tries to figure out which library you really meant to use.

  25. #25
    Senior Member
    Join Date
    Aug 2019
    Location
    southwest USA
    Posts
    114
    thanks for the feedback
    that is right - arduino 1.8.13 - since there is only one adc library in the teensy stuff i wonder why it had to think so hard

    very annoying item 1.8.13 - the engineering computers here have never been nor ever will be connected to to the world -
    and arduino often puts a warning in red in the bottom of the window that it failed to be able to go get some json file
    at their website - when the day comes that arduino will not run unless it can connect home i will back up one version
    and take what comes. Arduino says "have a nice day" i say "what if i don't want to have a nice day?"

    is there wisdom in staying with 1.8.13 or is it wiser to go back to 1.8.5 ?

Posting Permissions

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