PC Engine emulator, PSRAM experiment

Just a Note here,

You can probably speed up your Read / Write Speed, if you use functions:

psram_read_n(uint32_t addr, uint8_t * val, int n)
psram_write_n(uint32_t addr, uint8_t * val, int n)

instead of functions :

psram.psread(i)
psram.pswrite(i,randomdata[i&0xffff]);

In your Test code above,
you are wasting Freq Time in reinitializing the SPI connection for each/every Read / Write byte.

You could probably your improve your Read / Write Speed to maybe :

Read 8MB: from 3000msec to ~1500msec
Write 8MB: from 12000msec to ~6000msec

- Hope this is helpful !
 
Thanks very much, that sounds really good!
However, I am a bit puzzled about the syntax.
If I try to substitute:
Code:
uint8_t val = psram.psread(i);
would I put in this instead?
Code:
psram_read_n(i, val, 8);
What is the meaning of n? number of bits to read?
 
Back
Top