Forum Rule: Always post complete source code & details to reproduce any issue!
Page 3 of 3 FirstFirst 1 2 3
Results 51 to 62 of 62

Thread: Teensy 4.1 external flash memory question.

  1. #51
    Member
    Join Date
    Jul 2020
    Location
    California
    Posts
    29
    Awesome!

    If I'm allowed to share some photos of it, I will.

  2. #52
    Junior Member
    Join Date
    Jan 2021
    Posts
    5
    Hello,
    I am trying to add some flash memory to a teensy 4.1 to save informations in file from SD card or USB connection to teensy memory.
    If already find a lot of informations in this thread and others but not all that I want
    My questions are:
    - do we have to add a PSRAM chip to add flash memory chip?
    - witch component could I use if the advised chips (25Q128JVS, IPS6404LSQ, ESP-PSRAM64H) are not available from the suppliers my work allows? I didn't find any other test with different chips.
    -I see that I could add more than 16MB of flash memory but packaging of Winbond chips with more than 16MB memory didn't exist in Soic-8.

    I'm sorry if answer exists but I didn't find it anywhere. I could be more precise if necessary.
    Thank you for Help

  3. #53
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    13,422
    No, PSRAM is not needed to add FLASH. They are independent and either or both can be used.

    Hopefully the comments in this code snippet point to a chip that has been tested and used that can be acquired?

    Some of these chips are WSON 8 - they can be soldered to work just like the SOIC 8 do.

    The is from the LittleFS thread:
    Code:
    } known_chips[] = {
    	{{0xEF, 0x40, 0x15}, 24, 256, 4096, 2097152, 3000, 400000}, // Winbond W25Q16JV*IQ/W25Q16FV
    	{{0xEF, 0x40, 0x16}, 24, 256, 4096, 4194304, 3000, 400000}, // Winbond W25Q32JV*IQ/W25Q32FV
    	{{0xEF, 0x40, 0x17}, 24, 256, 4096, 8388608, 3000, 400000}, // Winbond W25Q64JV*IQ/W25Q64FV
    	{{0xEF, 0x40, 0x18}, 24, 256, 4096, 16777216, 3000, 400000}, // Winbond W25Q128JV*IQ/W25Q128FV
    	{{0xEF, 0x40, 0x19}, 32, 256, 4096, 33554432, 3000, 400000}, // Winbond W25Q256JV*IQ
    	{{0xEF, 0x40, 0x20}, 32, 256, 4096, 67108864, 3500, 400000}, // Winbond W25Q512JV*IQ
    	{{0xEF, 0x70, 0x17}, 24, 256, 4096, 8388608, 3000, 400000}, // Winbond W25Q64JV*IM (DTR)
    	{{0xEF, 0x70, 0x18}, 24, 256, 4096, 16777216, 3000, 400000}, // Winbond W25Q128JV*IM (DTR)
    	{{0xEF, 0x70, 0x19}, 32, 256, 4096, 33554432, 3000, 400000}, // Winbond W25Q256JV*IM (DTR)
    	{{0xEF, 0x70, 0x20}, 32, 256, 4096, 67108864, 3500, 400000}, // Winbond W25Q512JV*IM (DTR)
    	{{0x1F, 0x84, 0x01}, 24, 256, 4096, 524288, 2500, 300000}, // Adesto/Atmel AT25SF041
    	{{0x01, 0x40, 0x14}, 24, 256, 4096, 1048576, 5000, 300000}, // Spansion S25FL208K
    If so the direct support for these would be in the Beta TD 1.54 LittleFS library as a file system.

  4. #54
    Junior Member
    Join Date
    Jan 2021
    Posts
    5
    Thank you for your fast reply. It helps me a lot.

    I ordered Winbond W25Q512JVEIM, before it come, I'll try to understant how to initialize flash memory and use LittleFS, teensy41_extram, and SPIFFS_t4 librarys.

    I'll come to you again if I encounter difficulties.

    Thanks again.

  5. #55
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    13,422
    TD 1.54 Beta 6 will be out in some days and will have some stable version of LittleFS included - maybe by the time the chip arrives. That will have all the setup and operation commands needed to read and write that 64 MB Flash. You can use it as the FS - or perhaps if needed and adventurous use that for direct access.

    There are 1 and 2 Gb NAND chips - support for them seems fully functional as testing in recent posts shows with LittleFS - though refinement and inclusion in LittleFS for a more complex interface not yet certain.

    SPIFFS was an initial test platform that worked well - but it seems SPIFFS is being deprecated for use on 'other' systems where it was used like ESP's - and with working LittleFS it may not ever get added attention or support on Teensy.

  6. #56
    Senior Member+ mjs513's Avatar
    Join Date
    Jul 2014
    Location
    New York
    Posts
    6,316
    Quote Originally Posted by Concombre View Post
    Thank you for your fast reply. It helps me a lot.

    I ordered Winbond W25Q512JVEIM, before it come, I'll try to understant how to initialize flash memory and use LittleFS, teensy41_extram, and SPIFFS_t4 librarys.

    I'll come to you again if I encounter difficulties.

    Thanks again.
    Just as a heads up and by way of explanation of the libraries:
    teensy41_extram - only used for direct writing to the PSRAM and is a bit out dated and really doesn't need to be used anymore. Do a search on EXTMEM there are a few examples on one of the threads. Its still usable though. Remember PSRAM is not flash any data you write to it will be lost on power off.
    SPIFFS_t4 - consider this as deprecated and replaced by LittleFS. It only supports the 16MB version of the winbond flash.

  7. #57
    Junior Member
    Join Date
    Jan 2021
    Posts
    5
    Thank you both,
    I hope than TD1.54 will be ready soon, so I can Try to use my brand new flash.
    I'm still trying to understand how works LittleFS librairy and what I'm going to need.

  8. #58
    Junior Member
    Join Date
    Jan 2021
    Posts
    5
    Hello,
    I received my brand new W25Q128JVSM soldiered on my teensy4.1.
    I tried the LittleFS file test ListFiles to initialize flash ship with a few modification (chipSelect, SPI or QSPI) and the only result it gave was 'initialization failed!'.
    I think my welding is good.
    Click image for larger version. 

Name:	IMG20210125122448.jpg 
Views:	12 
Size:	109.8 KB 
ID:	23441

    So the problem may be I didn't understand how the library and test works.
    I'm sorry if my problem looks easy to solve but do you have some clue or file for init/test for me, it would really help beaucoup I don't know at all what to do?

  9. #59
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    13,422
    That picture shows lots of FLUX and garbage around the connections. I would carefully wash the board getting that cleaned off - here I use 90% Isopropyl and a light toothbrush to get residue off the PCB and around the pins - then get it dry before repowering. Water may work based on the flux involved? or 70% alcohol if that is all that is on hand - but won't dry as fast. I don't have an oven or anything to dry - I hold in hand and heat with a hair dryer hot air making sure no fluid trapped in the SD socket or on either side.

    > also looks like something sitting between pins 1 and 2 on the marked corner? Make sure there are no pin to pin shorts
    > Flux residue can result in failure to function

  10. #60
    Junior Member
    Join Date
    Jan 2021
    Posts
    5
    It looks better Click image for larger version. 

Name:	IMG20210126092348.jpg 
Views:	9 
Size:	117.6 KB 
ID:	23456
    But it don't works. I tried with a W25Q238JVSQ on a other teensy and I was able to initialize flash, create, write and read files, so I will work on it for the moment.
    The next step for me was to use MTP_t4 (https://github.com/WMXZ-EU/MTP_t4) to have a fast access to my files. I know this is a little bid far away of my initial problem but it seams this will be out dated when TD1.54 is available. So do you have any idea when a stable version will be available?

  11. #61
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    13,422
    @Concombre - That does look much better and no signs of shorts between pads.

    All but one of the pads between that chip and the open PSRAM pads are common - only the CS pin is unique. You might check the resistance between each like open pad and place the other probe on the top of each pin leg in turn near the chip body to see that they all make a low resistance connection - the one that is CS will read fully open as they have no connection, the other seven pins should end up showing connected less than an ohm.

    If that shows any weak connect Perhaps doing a reheat/reflow of the solder to of each pin/pad: hot iron onto pad against pin solder and into the pin until it goes liquid with both parts heated. Here I'd do that with a bit of flux paste on each as it would help with the melting and reflowing in less time for a better job. That would mean perhaps a quick clean and full dry again.

    If the chip came from a real distributor and wasn't damaged before or during soldering when fully soldered it should of course work. I've probably soldered a dozen of those FLASH, PSRAM and even the WSON FLASH chips with only the edges to get solder on without any failing to work - and I'm not well versed in soldering.

  12. #62
    Senior Member+ mjs513's Avatar
    Join Date
    Jul 2014
    Location
    New York
    Posts
    6,316
    @Concombre
    When you say it doesn't work want do you mean - what sketch did you use? Which version of the LittleFS library are you using - the one that came with Teensyduino?

Posting Permissions

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