Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 19 of 19

Thread: Teensy 4.1 psram memtest

  1. #1
    Junior Member
    Join Date
    Jan 2023
    Posts
    9

    Teensy 4.1 psram memtest

    Hey Guys I have installed PSRAM but when I run memtest tells me that I am missing header files H on my computer library?

  2. #2
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    17,435
    Starting with a T_4.1 and PSRAM soldered - Cool. github.com/PaulStoffregen/teensy41_psram_memtest

    Then A copy of the Arduino IDE needs to be installed 1.8.x or 2.x.

    Then Current TeensyDuino 1.57 for the IDE 1.8.x, or Teensy in IDE 2.x Board Manager after installing the PJRC URL to the Preferences Additional board mgr URL section:
    https://www.pjrc.com/teensy/package_teensy_index.json

    Then selecting the T_4.1 board in the IDE should build and work properly.

    If Errors the Verbose console output might explain what went wrong.

    <edit>
    Downloaded and tested here to work with IDE 2.0.3 and TD 1.58 beta 3 ( 0.58.3 ) on T_4.1 w/8MB PSRAM:
    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.43 seconds
    All memory tests passed :-)
    build notes:
    Code:
    ...
    Memory Usage on Teensy 4.1:
      FLASH: code:36796, data:6040, headers:8360   free for files:8075268
       RAM1: variables:6944, code:34176, padding:31360   free for local variables:451808
       RAM2: variables:12384  free for malloc/new:511904
    ...

  3. #3
    Junior Member
    Join Date
    Jan 2023
    Posts
    9
    I will give that a try thanks for your help

  4. #4
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    17,435
    Good luck - will be interesting to know what piece is missing to update or change.

  5. #5
    Junior Member
    Join Date
    Jan 2023
    Posts
    9
    It comes up with-

    Invalid library found in /users/justin/documents/arduino/libraries/teensy41_psram_memtest: no header files (.h) found in /users/justin/documents/arduino/libraries/teensy41_psram_memtest

    am i missing somthing?
    Last edited by Jayjer66; 01-21-2023 at 06:23 AM.

  6. #6
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    17,435
    Yes, that is not a 'library' - just a 'sketch' folder.

    Don't place the folder in "/users/justin/documents/arduino/libraries"

    Put it in your normal sketchbook or other folder and in the IDE just open the file: "teensy41_psram_memtest.ino"

    The PSRAM 'library' code is included in the CORES directly for the T_4.1 processor.

  7. #7
    Junior Member
    Join Date
    Jan 2023
    Posts
    9
    memory Usage on Teensy 4.1:
    FLASH: code:28100, data:7064, headers:8864 free for files:8082436
    RAM1: variables:7680, code:25432, padding:7336 free for local variables:483840
    RAM2: variables:12384 free for malloc/new:511904

    Cool thanks is this what it meant to say? sorry for thew noob questions.

  8. #8
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    17,435
    Quote Originally Posted by Jayjer66 View Post
    memory Usage on Teensy 4.1:
    FLASH: code:28100, data:7064, headers:8864 free for files:8082436
    RAM1: variables:7680, code:25432, padding:7336 free for local variables:483840
    RAM2: variables:12384 free for malloc/new:511904

    Cool thanks is this what it meant to say? sorry for thew noob questions.
    That looks close to what I have here. If you have TeensyDuino 1.57 it would have diff size as the Beta of 1.58 is in use here with an updated tool chain that grows code.

    Glad to help. The IDE gives a decent usable and reproducible build system - but there are some things to learn. Under the covers there is a lot going on that just works.

    The important thing is the output in the Serial Monitor showing the PSRAM to store and recall expected values provided by the memtest.

  9. #9
    Junior Member
    Join Date
    Jan 2023
    Posts
    9
    Cool thanks my main concern was that I soldered them correctly and that is usable PRRAM and Flash Memory. 👍

  10. #10
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    17,435
    Quote Originally Posted by Jayjer66 View Post
    i cant get it to test the memory but
    Is there any output on the serial monitor?

    Built with USB Type: Serial
    There should be output when it connects. That program will sit and do nothing until Serial connects with: while (!Serial) ; // wait

    That is as it should be - but a Serial Monitor needs to connect and then output as abbreviated in post #2 should show in some fashion.

    If nothing is displaying, then there is a problem of some sort.

    There is a photo to compare here (below): pjrc.com/store/psram.html

    That should match the chip 'pin 1'/DOT orientation and the soldering should be mostly clean as shown with no shorts or flux between the pins.

    Click image for larger version. 

Name:	teensy41_memory2.jpg 
Views:	18 
Size:	90.0 KB 
ID:	30207

  11. #11
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    28,479
    First, go to /users/justin/documents/arduino/libraries and delete anything you copied there. That "libraries" folder is a special location. Putting normal program there could cause problems. So before you go any farther, look in that folder and delete any folders and files you put there.

    Quit and restart Arduino IDE, just in case it's remembering anything about stuff that was incorrectly placed in that libraries folder.

    Then in Arduino, click File > New Sketch. You'll get a new window with a sample program that has 2 empty functions called setup() and loop(). Delete all that, so the window has nothing. Then go to this page on github for the memory test code.

    https://github.com/PaulStoffregen/te...am_memtest.ino

    Select all 147 lines and then copy to clipboard, either with CTRL-C (or Command-C if MacOS) or menu Edit > Copy. Then in blank Arduino window, where you deleted the sample do-nothing program, paste with CTRL-V or Edit > Paste. You'll see all 147 lines of code appear in the Arduino window. Then quickly check Tools > Board to make sure Teensy 4.1 is selected, and click the Upload button (2nd from the left in the green menu bar, shown with a right arrow).

    After the code is uploaded, click Tools > Port to quickly check that your Teensy board is selected. Then open the serial monitor window, which can be done by clicking the button on the far right side of the green menu bar, or with the menu Tools > Serial Monitor. If using the older Arduino IDE 1.8.x this opens another window. If using newer Arduino IDE 2.0.x, the serial monitor opens as tab in the bottom part of the main window. Either way, you should see the memory test results.

    If you want the program stored on your PC, in Arduino use File > Save As. It will give you a normal file save window with the proper location where Arduino expects to find saved files.


    Hopefully this helps you get past this initial hurdle and run the memory test. If you get stuck or something goes wrong, please remember we can't see your screen. Helping over the internet like this goes so much better if you show us a screenshot, so we can see whatever error message is on your screen, together with details like the tiny text that appears in the bottom part of the Arduino IDE window.

  12. #12
    Junior Member
    Join Date
    Jan 2023
    Posts
    9
    Yep I have a ext memory test 0mbyte better check something

  13. #13
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    17,435
    Quote Originally Posted by Jayjer66 View Post
    Yep I have a ext memory test 0mbyte better check something
    If you are seeing this: "EXTMEM Memory Test, 0 Mbyte"
    > And the Teensy LED is FLASHING then the PSRAM is not being recognized. That is what I see on a T_4.1 with NO PSRAM installed.
    > When a PSRAM is found and properly passes the tests the LED will just be ON continuously without any flashing.
    > It will stay OFF if the test never starts.

    Paul's p#11 steps are good to assure a clean build after that sketch was placed in the libraries folder - but with the text above it seems to have properly built.

    Given that "0 Mbyte" text is presented: It would be best to unplug the Teensy and examine the soldering and compare to the p#10 image - and notes on the linked PJRC site to assure the PSRAM is installed in the right location - when only one it needs to be in the end position between pins #31 to #34. And the soldering must be 'clean enough'. No shorts, good looking solder from all pins to pads, and even flux residue can interfere with this device at the high speeds it runs at.

  14. #14
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    17,435
    @Jayjer66 if you can upload a picture of the soldered PSRAM we can see it to confirm.

    And the Pin1/DOT of the PSRAM as shown in p10 image should be nearest corner Pin #32.

    Also, where did you get the PSRAM - and does it match one of those shown on the linked page where four are displayed on there?

  15. #15

  16. #16
    Junior Member
    Join Date
    Jan 2023
    Posts
    9
    It's the Lyontek chip listed on the website

  17. #17
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    17,435
    Quote Originally Posted by Jayjer66 View Post
    ICK - Flooded with Flux - if all that shine around the pins (on both PSRAM and FLASH) is flux and not a photo aberration.

    Chip label isn't legible to confirm make or type. But if a normal 8 MB PSRAM it should work, but that excess flux has to go.

    The solder looks well placed and connected - if a bit generous - but no apparent solder shorts.
    Click image for larger version. 

Name:	t41Flux.jpg 
Views:	26 
Size:	66.0 KB 
ID:	30208

    It probably should not hurt to carefully reflow each pin lightly given the flux will hopefully liquify and melt with the solder making sure if it does to contact the pad and the pin leg a brief time with the tip.

    With that done then the board needs washed of the flux. Some are water washable - here 91% Isopropyl alcohol works with an old clean toothbrush. The flux between the legs needs to be removed and rinsed free, then properly dried before powering.

    Given that all pins but the CS are common to both chips - both need to be clean to have best chance of either working properly.

    At least one user in past has done the reflow and flux removal to get it working. In fact one soldered here may have started odd and gone working with better flux removal.

  18. #18
    Junior Member
    Join Date
    Jan 2023
    Posts
    9
    Wow yes mate that worked all memory test passed. To much flux . Thanks 🙏🙏

  19. #19
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    17,435
    Quote Originally Posted by Jayjer66 View Post
    Wow yes mate that worked all memory test passed. To much flux . Thanks ����
    Great news! Enjoy.

Tags for this Thread

Posting Permissions

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