EXTMEM memory test program for testing PSRAM in teensy 4.1

Status
Not open for further replies.

jishnuch

Member
Recently I had purchased teensy 4.1 along with PSRAM from Pimoroni.

Today I did soldered carefully PSRAM on the teensy 4.1 board. I ran the memory test program as per pjrc website and it's showing EXTMEM memory Test, 0 Mbyte.

But when I am running next example i.e. having hello world ....that one is running fine and I am able to see the output in serial monitor.

I checked my soldering and according to me looks good and there is no sorting . Can anyone please advise on this matter.

I wanted to add three pics....unable to find out how to attach them for forum members to help to understand my problem.

my source code...

extern "C" uint8_t external_psram_size;
EXTMEM char bigBuffer[1000000] = {0};
int led = 13;

void setup() {
while (!Serial) ; // wait
uint8_t size = external_psram_size;
Serial.printf("EXTMEM Memory Test, %d Mbyte\n", size);
delay(5000);
strcpy(bigBuffer, "Hello Teensy 4.1 using PSRAM!");
pinMode(led, OUTPUT);
}

void loop() {
Serial.println(bigBuffer);
digitalWrite(led, HIGH);
delay(250);
digitalWrite(led, LOW);
delay(250);
}

the result in serial monitor...

EXTMEM memory test, 0 Mbyte

Hello Teensy 4.1 using PSRAM!
 
Last edited:
I added a PSRAM chip today and your program reports 8Mbyte. That leaves bad soldering, a bad chip, orientation, location, ??
 
But when I am running next example i.e. having hello world ....that one is running fine and I am able to see the output in serial monitor.

Cortex-M7 has a 32K data cache. To properly test the PSRAM, you need to flush and delete the cached data with arm_dcache_flush_delete(address, size). See the memory test program for an example.

Your program is almost certainly "working" without the PSRAM because the string you copied to the external memory is being held in the M7's cache. You're just reading it back from the cache. If your program uses other parts of the memory which cause the M7 to automatically flush the cache and decide to cache something else, you'll find it will indeed fail when the M7 tries to actually read from the PSRAM to refill the cache.
 
I added a PSRAM chip today and your program reports 8Mbyte. That leaves bad soldering, a bad chip, orientation, location, ??

(1) bad soldering - I checked the soldering using high resolution eyeglass and found it to be clean and there is no shorting among them.
(2) Orientation - have matched the dot on the chip with the dot marked on the board.
(3) location - have soldered on the location between pin # 31, 32 and 33, 34.
(4) bad chip - this may be possible - since I don't have have another chip and hence there is no other way to verify.
 
Cortex-M7 has a 32K data cache. To properly test the PSRAM, you need to flush and delete the cached data with arm_dcache_flush_delete(address, size). See the memory test program for an example.

Your program is almost certainly "working" without the PSRAM because the string you copied to the external memory is being held in the M7's cache. You're just reading it back from the cache. If your program uses other parts of the memory which cause the M7 to automatically flush the cache and decide to cache something else, you'll find it will indeed fail when the M7 tries to actually read from the PSRAM to refill the cache.

this is very interesting....you have answered all my questions. So as of now only solution is that I have to get a new PSRAM chip and replace it with the old one.
 
Maybe first re-heat the 8 solder connections? Apply liquid flux, if you have any. Don't be shy about leaving your soldering iron in contact for several seconds, since you can't make the chip any worse than things are now.

We've seen this before, where one of the pins looked soldered but wasn't. Reheating the soldering usually fixes that problem.
 
I case it helps, I happened to solder the PSRAM to my Teensy 4.1 last weekend, both ordered from Pimoroni too. And the result of the test was positive. Of course, there could be a problem with that specific chip, for any reason. Just wanted to verify that it looks like a reliable supplier.
 
Maybe first re-heat the 8 solder connections? Apply liquid flux, if you have any. Don't be shy about leaving your soldering iron in contact for several seconds, since you can't make the chip any worse than things are now.

We've seen this before, where one of the pins looked soldered but wasn't. Reheating the soldering usually fixes that problem.

Boss... you are 200% right. This was the exact problem and today morning I applied the solder paste and did held soldering iron for longer time on all the solder connections and finally ran your test program and its working. THANKS TO ALL.
 
Boss... you are 200% right. This was the exact problem and today morning I applied the solder paste and did held soldering iron for longer time on all the solder connections and finally ran your test program and its working. THANKS TO ALL.

naah the RC part is the boss over thee...
 
Maybe first re-heat the 8 solder connections? Apply liquid flux, if you have any. Don't be shy about leaving your soldering iron in contact for several seconds, since you can't make the chip any worse than things are now.

We've seen this before, where one of the pins looked soldered but wasn't. Reheating the soldering usually fixes that problem.

Same advice if I have 2 PSRAM chips soldered in place but only see 8MB in the test? Or is there something else I need to change to access the 2nd PSRAM chip?
 
Yes, same advice. The memory test will automatically detect 2 chips and test all 16 MB. If you're soldered 2 PSRAM chips it's detecting only 1, you've almost certainly got a soldering problem on the 2nd chip (the larger set pads).
 
Thanks, that was it. I guess my eyes aren't as good as they used to be LOL. Working great now

Yes, same advice. The memory test will automatically detect 2 chips and test all 16 MB. If you're soldered 2 PSRAM chips it's detecting only 1, you've almost certainly got a soldering problem on the 2nd chip (the larger set pads).
 
Status
Not open for further replies.
Back
Top