64Mo PSRAM chip APS6404L compatibility

.... advertised as a replacement for the 8Mo PSRAM chips IPS6404 :
.....
64 Mo of PSRAM sounds great,

It's exactly the same size, 8 Mbyte.

screenshot.png



so I was wondering if this would be compatible with a teensy 4.1.

Has anyone tried this chip ?

Haven't tried this one, but from the datasheet it looks like it should work.
 
Would it be possible to use this chip with Teensy 4.0? I'm trying to figure out how to initialise it (how to indicate the CS pin for example) but at the moment I'm pretty lost
 
Yes, connects like any other SPI memory. You can't use the QSPI on Teensy 4.0, though - see https://forum.pjrc.com/threads/72321-QSPI-PSRAM-for-Teensy-4-0. It can be used as delay memory on the audio adaptor, with some long-pending-as-a-PR updates to the library.

Hi h4yn0nnym0u5e, I'm using your audio library so i could theoretically use it, correct?
Anyway I have no idea how to initiallize the chip, any tip?
have seen in the delay code the pin assignment which I assume that have to tweak to my needs, and I was thinking about using it for some big arrays etc,
 
Hi h4yn0nnym0u5e, I'm using your audio library so i could theoretically use it, correct?
Anyway I have no idea how to initiallize the chip, any tip?
have seen in the delay code the pin assignment which I assume that have to tweak to my needs, and I was thinking about using it for some big arrays etc,

I've got a bunch of different branches - you'd be wanting this one to use the improved AudioEffectDelayExternal ... oh, it's you ... :D ... yes, the Dynamic version of the library has my improvements to AudioEffectDelayExternal, too. If you hook the PSRAM to the same pins as the audio adaptor uses (6 for CS, plus 11 through 13, plus power) then no pin assignment tweaks are needed. You won't need any initialisation, either, as far as I'm aware they "just work".

I would counsel against trying to use it for big arrays at the same time as for audio delays, as you'd need to be very sure you didn't use the same areas as were being used for the delays. You could write an array class that derives from the AudioExtMem class (see extmem.cpp and .h), which would sort out this memory management for you, but it's not massively well documented.

I'm also not 100% sure how well sharing the SPI bus between user code and interrupt code would work out. I may be about to find out, as I've finally got around to playing with a TFT display...

EDIT: wrong CS, should have been 6 not 10, my bad
 
I've got a bunch of different branches - you'd be wanting this one to use the improved AudioEffectDelayExternal ... oh, it's you ... :D ... yes, the Dynamic version of the library has my improvements to AudioEffectDelayExternal, too. If you hook the PSRAM to the same pins as the audio adaptor uses (6 for CS, plus 11 through 13, plus power) then no pin assignment tweaks are needed. You won't need any initialisation, either, as far as I'm aware they "just work".

I would counsel against trying to use it for big arrays at the same time as for audio delays, as you'd need to be very sure you didn't use the same areas as were being used for the delays. You could write an array class that derives from the AudioExtMem class (see extmem.cpp and .h), which would sort out this memory management for you, but it's not massively well documented.

I'm also not 100% sure how well sharing the SPI bus between user code and interrupt code would work out. I may be about to find out, as I've finally got around to playing with a TFT display...

EDIT: wrong CS, should have been 6 not 10, my bad

Thanks for the info, will give a try!
 
Well, at the moment I haven't been able to make it work, I'm using pins 11, 12, 13 and 30 for CS (pin 6 is used already on my project),
it does compile but gets stuck when the delay is initialised
tried modifying the settings on extmem.cpp
Code:
// in the extmem.cpp file:
#define SPIRAM_MOSI_PIN  11 // it was 7
#define SPIRAM_MISO_PIN  12 
#define SPIRAM_SCK_PIN   13 // it was 14

#define SPIRAM_CS_PIN    30 // it was 6

// in the ini.h file: 
AudioEffectDelayExternal delayExt(AUDIO_MEMORY_PSRAM64, 1000);
 
More info needed on "gets stuck"! There's been a recent issue with AudioEffectDelayExternal and other classes which attempt to use SPI, Wire etc in their constructors ... this should have been fixed in Teensyduino 1.59 beta 3. The symptom is your Teensy never makes it as far as setup(), and needs the Program button pressing to upload new code.
 
More info needed on "gets stuck"! There's been a recent issue with AudioEffectDelayExternal and other classes which attempt to use SPI, Wire etc in their constructors ... this should have been fixed in Teensyduino 1.59 beta 3. The symptom is your Teensy never makes it as far as setup(), and needs the Program button pressing to upload new code.

I'm not using last Teensyduino version, got a windows laptop with last versions of both Teensyduino and your dynamic library but for some reason my code does not work there (it does compile, but hardware enters in a reboot cycle when flashed with it) so for this particular project I'm using an older version (it says 1.56) maybe that is the problem, or it could be a hardware problem, will check it again.

Made more tests and it does not get stuck when the delay is created in the ini.h file, but looks like it does not pass any sound, and if used dynamically it gets stuck: when the AudioEffectDelayExternal object is created hardware does not respond and sound stops BUT I can upload code without pressing the button.
 
Back
Top